TCP server does not detect the client network failure
From: Mariya (mariya.k_at_gmail.com)
Date: 07/31/04
- Previous message: Pascal Costanza: "Re: Your Guru Paul Graham is getting trashed on Slashdot."
- Next in thread: Roedy Green: "Re: TCP server does not detect the client network failure"
- Reply: Roedy Green: "Re: TCP server does not detect the client network failure"
- Reply: Frank: "Re: TCP server does not detect the client network failure"
- Reply: Tony Morris: "Re: TCP server does not detect the client network failure"
- Reply: Rene: "Re: TCP server does not detect the client network failure"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 30 Jul 2004 17:48:06 -0700
Hi,
This is a behavior of the TCP socket in Java I dont' understand:.
Let say we have a simple client/server application running on TWO different
machines.
The client send bytes to the server.
The server recieved the bytes and wait for about X sec.
During this waiting time, we disconnect the server from the network (just by
unplugging the server network cable).
After the waiting time the server is aware of the network failure (a
SocketException is thrown : connection reset, because it is trying to send
the response)
But on the client side it is still stuck on a "rcv =
commandInput.readLine();" statement (see after for the complete code), it
will never be aware of the network failure !!! Even after one hour the
client is still waiting to read something on a closed socket. Is this the
normal behavior ?
In reality we are dealing with an application that use the FTP server to
server mode (we are controlling only the command socket, the data transfer
is made by the servers). We have to transfer huge files, thus we can not set
up a time out. If the last scenario occurs, some of our transfers are stuck
and it is not possible for us to detect the failure. The client will wait
for ever the response.
Does anybody have already deal with that
- Previous message: Pascal Costanza: "Re: Your Guru Paul Graham is getting trashed on Slashdot."
- Next in thread: Roedy Green: "Re: TCP server does not detect the client network failure"
- Reply: Roedy Green: "Re: TCP server does not detect the client network failure"
- Reply: Frank: "Re: TCP server does not detect the client network failure"
- Reply: Tony Morris: "Re: TCP server does not detect the client network failure"
- Reply: Rene: "Re: TCP server does not detect the client network failure"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|