Skip to content

Commit

Permalink
Handle zero agg_timeout properly
Browse files Browse the repository at this point in the history
  • Loading branch information
svpcom committed Dec 30, 2024
1 parent bb03607 commit 44a9653
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wfb_ng/proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -174,7 +174,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

Expand Down

0 comments on commit 44a9653

Please sign in to comment.