Sorry to jump on the thread, but I'm a bit surprised by (and curious about) the behavior exposed here and the fact that Mina does not detect it ...

Is the connections between your 2 boxes direct (ie no proxy or firewall) because I witnessed a couple of years ago the exact same behavior with one of our application and we found out that the issue was that a proxy was leaving the socket hanging there making the client or server think it was still active.

From what I remember from our diverse implementation at work (I am not familiar with Mina's inner working). I think the poll would indicate something occurred and a read confirm the socket closing (cleanly or not).

Just trying to help and maybe shed some light ...
Patrick S.

On 1/11/2010 6:12 PM, David Rosenstrauch wrote:
On 01/11/2010 06:02 PM, Emmanuel LŽcharny wrote:
We will try to help ...

Thanks much for the help Emmanuel.

Anyone know what might be going on here and/or how to fix? Why wouldn't MINA be closing out those old connections?
Hmmm. If you brutally shutdowned the client, I'm afraid the socket will remain in ESTABLISHED states for ever, accordingly to http://www.cis.temple.edu/~ingargio/cis307/readings/tcpstates.gif, as you haven't send any FIN segment.

May be checking for the socket idleness every X minutes could help to close the orphan sockets ?

I'm not clear on what you mean by this. How would I do a check like that in MINA? Are you suggesting adding some sort of ping/pong logic? If not, then perhaps you could point me to some sample code that illustrates what you mean?

Thanks,

DR

Reply via email to