From fec604f24629d194ce226e0dee5b771abeb437b8 Mon Sep 17 00:00:00 2001 From: Nils Weiss Date: Sun, 22 Sep 2024 08:24:32 +0200 Subject: [PATCH] Restore sndrcv behaviour from before 53afe84 --- scapy/sendrecv.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scapy/sendrecv.py b/scapy/sendrecv.py index 18775d50291..88080282b4f 100644 --- a/scapy/sendrecv.py +++ b/scapy/sendrecv.py @@ -128,7 +128,7 @@ def __init__(self, rcv_pks=None, # type: Optional[SuperSocket] prebuild=False, # type: bool _flood=None, # type: Optional[_FloodGenerator] - threaded=False, # type: bool + threaded=True, # type: bool session=None, # type: Optional[_GlobSessionType] chainEX=False, # type: bool stop_filter=None # type: Optional[Callable[[Packet], bool]] @@ -266,8 +266,7 @@ def _sndrcv_snd(self): self.hsent.setdefault(p.hashret(), []).append(p) # Send packet self.pks.send(p) - if self.inter: - time.sleep(self.inter) + time.sleep(self.inter) if self.breakout: break i += 1