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

Java STOMP client can leave pipes open #26

Open
sjrmanning opened this issue Apr 8, 2015 · 0 comments
Open

Java STOMP client can leave pipes open #26

sjrmanning opened this issue Apr 8, 2015 · 0 comments

Comments

@sjrmanning
Copy link

I ran into this issue using the STOMP client monitored with a heartbeat from the server. When a heartbeat isn't received for a certain period, I was calling disconnect() before reconnecting with connect().

Disconnection would time out, and somewhere, possibly in the ClientBootstrap, pipes were left open. A new connect() call recreates the bootstrap object and opens new pipes. If the server was un-reachable and connect() was called indefinitely, eventually the application would run into a too many open files/sockets exception.

Interestingly, I created a reconnect() method which performs similar to connect() but without creating new ClientBootstrap and ChannelPipelineFactory objects and this manages to re-establish a connection without opening more pipes.

Unfortunately I'm not too familiar with netty so I'm not really sure why the disconnection process isn't cleaning up properly before the bootstrap object is set to null.

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