TooTallNate / Java-WebSocket

A barebones WebSocket client and server implementation written in 100% Java.
http://tootallnate.github.io/Java-WebSocket
MIT License
10.53k stars 2.58k forks source link

Thread created by NamedThreadFactory should be a daemon #1390

Closed z1c0 closed 9 months ago

z1c0 commented 9 months ago

In src/main/java/org/java_websocket/util/NamedThreadFactory.java, when a new Thread gets created, it should be marked as a background thread.

thread.setDaemon(true);

I'm using this library in a context where I have no control over shutdown (I get no callback or notification) and this thread is preventing proper shutdown.

PhilipRoman commented 9 months ago

Looks like we already have open PR #1201 for this. I will review it when I have time and most likely merge.

z1c0 commented 9 months ago

Great news! Thanks