timeout bug in the Hub server

2 views
Skip to first unread message

shan muh

unread,
Jun 24, 2008, 6:31:40 PM6/24/08
to one-stone-soup
Hi,

I think there is a bug in the HUB server. In case of up "screen"
connection, the timeout of the up stream connection (client->hub-
>server) should be set to 0. Indeed, no data is sent from the client
to the server in case of "screen" connection. I patched the code in
socketConnection.initialize() with the following code:

int upTimeout = 10000;
int downTimeout = 10000;

if(alias.endsWith(".screen"))
upTimeout = 0;

up = new
StreamConnection(socket1.getInputStream(),socket2.getOutputStream(),"Up
Stream Connection for "+alias,upTimeout);
down = new
StreamConnection(socket2.getInputStream(),socket1.getOutputStream(),"Down
Stream Connection for "+alias,downTimeout);

The hub works fine now.

Best regards
Shan

nicholas....@googlemail.com

unread,
Jun 27, 2008, 4:35:42 PM6/27/08
to one-stone-soup
Thank you for finding this bug. The fix is actually to set all
timeouts to 0 on the StreamConnections as the SocketConnection handles
timeouts itself. The timeout is set to 60 seconds, and may need
setting to a lower figure. Maybe 10 seconds.

Thanks again
Nik Cross
Reply all
Reply to author
Forward
0 new messages