db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Hlavatý <hla...@code.cz>
Subject Re: Help detecting client disconnects for network server
Date Sun, 10 Oct 2004 17:38:20 GMT
Kathey Marsden wrote:
> I am working on an issue with Network Server where the server does not
> clean up connection threads properly for disconnected clients.  I get an
>  IOException if the client program is killed or aborted with <ctrl> c
> but if the network cable is just unplugged or the machine turned off, we
> don't detect the disconnect properly.

I have been looking at the DRDAv3 protocol specs to see if there is any way to implement
protocol level pings that could be used for client disconnect detection.
It looks to me the only way to implement a ping is a client initiated one,
using the EXCSAT command. This could be used, but requires cooperation from the client.
See chapter 11.2.4 of the spec vol. 1.
So it would basically need client to automatically ping the server from time to time
during inactivity. Lack of these pings could be interpreted by server as client crash.
But that would not work very well with third party DRDA clients that have no idea
about the ping we want to use, nor can we modify JDBC driver from IBM to do that ;(

Looks like the SO_KEEPALIVE mechanism will have to do.

Jan

Mime
View raw message