Description
Hello,
I have a number of client devices connecting as websocket clients to a server. To handle network interruptions, I reconnect to the WS server after each disconnection, with some backoff, etc.
Some of these devices are on unreliable networks, and I'm sometimes seeing websocket-client
fail to time out and simply hang indefinitely. I think what's happening is that the actual socket connection is succeeding, but then the client is losing connectivity during the handshake. Without a keepalive on the TCP connection, or a timeout handler on the Netty channel, the deferred never succeeds or fails.
I'm using deferred/timeout!
to work around this but I'm not sure what's happening under the hood - i.e. whether or this means that sockets/resources are still allocated and hanging around forever in the background.
Adding an IdleStateHandler
to the Netty channel while the handshake is in progress might fix this.
Alex