I have a multithreaded server - one thread / client. I have a client
1 connected to thread A, and a I have client 2 connected to thread B.
After certain equal period of inactivity Client 1 sends a message to
Thread A. Thread A receives the message, and sends it back to client
1 as well as client 2. Client 1 receives the message succesfully but
then when Thread A tries to send to client 2 out of a sudden Thread B
throws "Connection Reset By Peer" where it was blocking on
..readObject(); (note that Thread B has not read anything from CLient 2
cause Client2 never wrote anything.) and then (right after that)
Thread A throws a "Broken Pipe" exception where it did .writeObject()
which is strange as Client 1 actualy receives the message succesfully
from thread A. This only happens if there is a period of inactivity
on both clients, other than that everything works fine.
On Tue, 15 Jul 2003 20:33:33 GMT, Serial # 19781010
<email@example.com> wrote or quoted :
>Thread A throws a "Broken Pipe" exception where it did .writeObject()
>which is strange as Client 1 actualy receives the message succesfully
>from thread A
You did not say which OS you are having this trouble on. you could
resort to heartbeat dummy messages to keep the pipe alive, or just
auto reconnect if it dies on you.
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.