From d8d069f299600cd17071352d31201b0e794e89da Mon Sep 17 00:00:00 2001 From: Vasily Evseenko Date: Mon, 30 Dec 2024 21:05:24 +0300 Subject: [PATCH] Handle zero agg_timeout properly --- wfb_ng/proxy.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wfb_ng/proxy.py b/wfb_ng/proxy.py index b145b970..cf862dcd 100644 --- a/wfb_ng/proxy.py +++ b/wfb_ng/proxy.py @@ -60,7 +60,7 @@ def _send_to_peer(self, data): def messageReceived(self, data): # send message to local transport - if self.agg_max_size is None or self.agg_timeout is None: + if self.agg_max_size is None or not self.agg_timeout: return self._send_to_peer(data) if len(data) > self.agg_max_size: @@ -188,7 +188,7 @@ def write(self, msg): self.transport.write(msg, self.mirror) # Send non-aggregated packets directly - if self.agg_max_size is None or self.agg_timeout is None: + if self.agg_max_size is None or not self.agg_timeout: self.transport.write(msg, self.reply_addr) return