socket connection not being reset correctly



I have an instant messenger server written in Java and running on linux. If
the connection between the client (C++ win32) gets broken for any reason
(e.g. network cable pulled) then the server doesn't notice and still thinks
the connection is intact. Whats more, we send out data on the connection
every 60 seconds to 'test' the connection, but the server is still not
detecting an error in the connection. At least I would have thought that
trying to send out data on a broken connection would cause it to fail.
I used to run the server on windows and I'm pretty sure that this behaviour
was not apparent then. Are there any known issues of this on linux? or am I
doing something wrong with my code (below)?

Thanks,
Allan


lreader = new BufferedReader(new SocketInputStream(lCCB.getSocket));
try
{
String lread = lreader.readLine();
if (lread == null)
{
throw new Exception("Graceful client disconnect");
}
}
catch (Exception e)
{
dosconnectedCLient(lCCB);
}


.



Relevant Pages

  • Re: .Net Scalability problem
    ... LoadRunner will peak out a server with a few virtual users. ... To get an idea of load, ... Fire off the test client and watch the number of ... > So I think that the MTC generate concurrent connection and per ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Connection lost at same time every hour (sometimes)
    ... After making the two following alterations on the server the problem seems ... After analyze your ipconfig on SBS and client, ... Then, other connection is good, ...
    (microsoft.public.windows.server.sbs)
  • Re: server disconnection - very often
    ... Reason of permanent popups is VMware server aplication on clients. ... Run CEICW to configure the network of SBS: ... Two network adapters - manual router connection to broadband ... Uninstall VMware on client. ...
    (microsoft.public.windows.server.sbs)
  • Re: Lan setup 2 nic
    ... The external nic only has TCP/IP enabled. ... Ipconfig of the server is looking good, but the client is still missing the ... > connection so we have a 2 nic with router setup now. ...
    (microsoft.public.windows.server.sbs)
  • Re: Regular disconnections from remote web workplace
    ... I can connect to office server and all office clients from home at all times ... be physically working right up until the connection is lost. ... If I enter http://companyip from a client I receive the login screen for the ... Click Services tab and select Hide All Microsoft Services and Disable ...
    (microsoft.public.windows.server.sbs)