The thread is terminated due to the Exception which occurs when the socket connection is closed unexpectedly and abruptly. The WebSocketConnectionClosedException with a message "socket is already closed" occurs when the thread tries to send data through the closed socket connection. The Exception is captured in a try-catch block but due to the while loop in which it is placed, the new sniffer thread is constantly being created making the program doomed to repeat its mistake over and over again like it is a Groundhog Day.
Expected Behavior
To stop the thread which is sniffing packets in a non-violent way and possibly try to reconnect to the web server before sending more data.
Is there an existing issue for this?
System information
2023.3
Actual Behavior
The thread is terminated due to the
Exception
which occurs when the socket connection is closed unexpectedly and abruptly. TheWebSocketConnectionClosedException
with a message "socket is already closed" occurs when the thread tries to send data through the closed socket connection. TheException
is captured in a try-catch block but due to the while loop in which it is placed, the new sniffer thread is constantly being created making the program doomed to repeat its mistake over and over again like it is a Groundhog Day.Expected Behavior
To stop the thread which is sniffing packets in a non-violent way and possibly try to reconnect to the web server before sending more data.
Steps To Reproduce
Redis
serverReact
serverAnything else?
Here is a screenshot of the error.![Screenshot_2023-12-15_19-38-04](https://github.com/AleksaMCode/Preferred-Network-List-Sniffer/assets/23129943/ec4e0c19-c6a6-4ca4-be4d-0eed55236982)