I have a strange issue closing the connection. My ProtocolDecoder detects an exception and throws an exception. This closes the session. So far so good, but the client thinks it's session is still open. Since both run on the same machine the network should not cause the trouble. I tried to set tcpNodelay, keepAlive and soLinger=-1 on client and server. I added some wait time on the client, e.g. 1 second, and checked the connection status again. Still open.

Client                       Server
send message --------------> process message
                             close session

sleep 500ms
send another message (ok) ->

At least my IoServiceListener says the session is closed, about 300ms later. About a second later the client still thinks isClosed() = false.

I expect that the session close initializes the FIN TCP messages and the client notices that the connection is broken. At least the next write should fail.

Any ideas?




Reply via email to