top sniff() on empty s.recv()

- improved from Mattias Ahlbäck original patch
This commit is contained in:
Guillaume Valadon 2016-11-03 10:39:22 +01:00
parent 7f45014629
commit d4a09f4ca9
1 changed files with 4 additions and 1 deletions

View File

@ -608,7 +608,10 @@ interfaces)
sel = select(sniff_sockets, [], [], remain)
for s in sel[0]:
p = s.recv()
if p is not None:
if p is None and offline is not None:
stop_event = True
break
elif p is not None:
if lfilter and not lfilter(p):
continue
if s in label: