Open
Description
After 924dfde, __next__()
continues instead of returning None when timing out. This does not seem like ideal behavior. Am I misinterpreting timeout or misusing the function? Ideal code snippet:
import pcap
p = pcap.pcap(timeout_ms=50)
# Set the filter so that no packets will arrive
p.setfilter("port 55555")
try:
timestamp, packet = p.__next__()
except TypeError:
print("__next__() returned None in a reasonable time-frame!")
I modified pcap.pyx to return None and the code snippet worked.