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

Worker threads do not close if bind() fails #222

Closed
GiGurra opened this issue Dec 23, 2013 · 1 comment
Closed

Worker threads do not close if bind() fails #222

GiGurra opened this issue Dec 23, 2013 · 1 comment

Comments

@GiGurra
Copy link

GiGurra commented Dec 23, 2013

In case the host port (e.g. 80) is occupied on the host (let's say running another web server), you expect a bind error and then the server to close down.

The server's main thread/selector thread does shut down in that scenario, but its worker threads do not.

The reason is that in case of bind() failure, WebSocketServer.run() returns before the try-catch-finally-block which in finally contains shutdown of worker threads.

@marci4 marci4 self-assigned this May 8, 2017
@marci4 marci4 added this to the Release 1.3.4 milestone May 8, 2017
marci4 added a commit to marci4/Java-WebSocket-Dev that referenced this issue May 8, 2017
Closing worker threads on IOException during bind
marci4 added a commit that referenced this issue May 8, 2017
@marci4
Copy link
Collaborator

marci4 commented May 8, 2017

Fixed with #477

@marci4 marci4 closed this as completed May 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants