Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PcapHandle not Closed if no packets received. How to forceful close handle #281

Open
pratmodi opened this issue Mar 25, 2021 · 0 comments
Open

Comments

@pratmodi
Copy link

pratmodi commented Mar 25, 2021

We are implementing dumping by packetcount based on filter by port. The call to listener.gotPacket(handle.getNextPacketEx()) keeps on listening for packets. There's a readtimeout too, but the call is stuck at listener.gotPacket(handle.getNextPacketEx()). We have already tried putting handle.close() in various places like finally,etc but it never gets closed. If we are sending packet traffic manually through postman at given port, then the packets get dumped and handle & dumper both get closed and work fine. Please suggest how to close the handle when there is no traffic. Again, we have kept readtimeout of 20 seconds but that also doesnt work. Following is the code we have written -

                                              if (dumper.isOpen()) {
							listener.gotPacket(handle.getNextPacketEx());
						}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant