O
Oliver Hittmeyer
hello [NG],
Assuming a client/server app: Client and server are communicating by
sending message objects to each other. When we're going to unplug the
network adapter server-side, the server-app will detect this
automatically & is fine out...
not so the client-app: the application (implemented in blocking mode;
implemented via 2 different threads) is still listening to the socket..
and now there comes the story: when we're going to trigger the client-
app to send a message object over to the server, the socket
1. does not throw any IOException when going to write the data
2. approx. 50sec after the write(), the blocking read() will throw
a SocketException: Connection reset by peer
does anybody know about this? why doesn't there occur an IOException
when going to write to a socket, which does not have a connected peer?
and why is it, that the read() does take 50sec to determine the socket
is dead? - and are there any tips/tricks/work-arounds to get this
"broken network"-detection faster?
thanks in advance
Oliver
Assuming a client/server app: Client and server are communicating by
sending message objects to each other. When we're going to unplug the
network adapter server-side, the server-app will detect this
automatically & is fine out...
not so the client-app: the application (implemented in blocking mode;
implemented via 2 different threads) is still listening to the socket..
and now there comes the story: when we're going to trigger the client-
app to send a message object over to the server, the socket
1. does not throw any IOException when going to write the data
2. approx. 50sec after the write(), the blocking read() will throw
a SocketException: Connection reset by peer
does anybody know about this? why doesn't there occur an IOException
when going to write to a socket, which does not have a connected peer?
and why is it, that the read() does take 50sec to determine the socket
is dead? - and are there any tips/tricks/work-arounds to get this
"broken network"-detection faster?
thanks in advance
Oliver