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
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.
The text was updated successfully, but these errors were encountered:
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 withconnect()
.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 toconnect()
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.
The text was updated successfully, but these errors were encountered: