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

Making SocketIO (netty) thread as daemon #826

Open
chentv00 opened this issue Sep 8, 2021 · 0 comments
Open

Making SocketIO (netty) thread as daemon #826

chentv00 opened this issue Sep 8, 2021 · 0 comments

Comments

@chentv00
Copy link

chentv00 commented Sep 8, 2021

In com.corundumstudio.socketio.SocketIOServer.class line 198 – 204, when creating NioEventLoopGroup or EpollEventLoopGroup, would it be possible to expose the 2nd parameter where we get to set the ThreadFactory? Maybe this custom ThreadFactory can be passed in via the "Configuration" object.

The reason to have a custom ThreadFactory is that by default Netty's thread creation does not set the thread as a daemon (like thread.setDaemon(true);). This can cause a non-clean shutdown like described in https://forums.couchbase.com/t/java-client-occasionally-leaks-non-daemon-netty-io-threads-after-shutdown/1252.

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