🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: aus.computers.java
2 messages
2 total messages Started by Serial # 19781010 Tue, 15 Jul 2003 20:14
objectInputStream.readObject() does not work properly after certain period of inactivity.
#144
Author: Serial # 19781010
Date: Tue, 15 Jul 2003 20:14
13 lines
1976 bytes
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.
Re: objectInputStream.readObject() does not work properly after certain period of inactivity.
#152
Author: Tobias Sprute
Date: Wed, 20 Aug 2003 20:12
12 lines
1805 bytes
according to the error message "connection reset by peer" i guess you use a
tcp connection.
as tcp usually has a connection timeout sockets are closed after a period of
time without any traffic.
you may either send some dummy packets between your clients, or you  can
dynamically open and close sockets.
another idea would be to increase (or disable) connection timeout - but i
only know it _is_ possible, but not exactly _how_

hth (even if i'm late with that),

tobi
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads