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
Hello, i'm writing auto tests using your library as a transport for ws client. If any exception happens in runtime the main thread dies but some treads inside this webSocket client instance are still running and it doesn't allow my test to fall or finish successfully. System.exit() doesn't approach my aims. And i can't always catch exceptions and close connection manually, is there any setting to do it automatically in case of any any exception or assertion error in main test thread?
The text was updated successfully, but these errors were encountered:
If any Exception occurs in this block main thread of java program stops, but one of these internal threads in transport continues to be alive:
/**
* The thread to write outgoing message
*/
private Thread writeThread;
/**
* The thread to connect and read message
*/
private Thread connectReadThread;
I had solved my issue for destroying all threads by changing main logic of my programm, but i was wondering if there is any handler for shutting down all internal threads if i want it.Does close() function destroy both treads for reading and writing?
Hello, i'm writing auto tests using your library as a transport for ws client. If any exception happens in runtime the main thread dies but some treads inside this webSocket client instance are still running and it doesn't allow my test to fall or finish successfully. System.exit() doesn't approach my aims. And i can't always catch exceptions and close connection manually, is there any setting to do it automatically in case of any any exception or assertion error in main test thread?
The text was updated successfully, but these errors were encountered: