You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
In Linux, after repeatedly calling LiveCapture.sniff() from the same Python process, the process started to throw exceptions 'too many open files'. Inspecting the open files for the Python process demonstrated that with each call to sniff(), the number of open FIFO pipes increased.
To Reproduce
Steps to reproduce the behavior:
Run the Python program below, and in another terminal use 'lsof -p ' to view the number of open files.
import time
import pyshark
capture = pyshark.LiveCapture(interface='eno1')
i = 1
while True:
print("Capturing #%d" % i)
capture.sniff(timeout=2)
capture.close()
print("Sleeping %d" % i)
time.sleep(2)
i += 1
Describe the bug
In Linux, after repeatedly calling LiveCapture.sniff() from the same Python process, the process started to throw exceptions 'too many open files'. Inspecting the open files for the Python process demonstrated that with each call to sniff(), the number of open FIFO pipes increased.
To Reproduce
Steps to reproduce the behavior:
Run the Python program below, and in another terminal use 'lsof -p ' to view the number of open files.
Example output:
Expected behavior
The desired behavior is that any files opened by LiveCapture.sniff() are also closed after the sniff is done.
Versions:
The text was updated successfully, but these errors were encountered: