Page 1 of 1

Client hangs if no internet access

Posted: Thu Jul 25, 2013 12:01 am
by SilverNexus
The other day, the internet was down at my house and I tried to play on a local Crossfire server I have on my network. Unfortunately, the client would not get past the metaserver selection screen. It would give me a message that it connected in the Status: area under the direct connect (IP) box, but then refused to go any farther. However, I could still select the quit button and do other things in the window with normal response, so it didn't freeze.

Personally, I think it may have been because the metaserver had not replied to it yet (because the internet was down). This means either I did not wait long enough for the metaserver request to time out, or the metaserver timeout is set to too long a time (assuming a timeout exists in the first place).

Posted: Fri Jul 26, 2013 7:40 pm
by Leaf
The connection attempt is designed to time out.

It used to be 3minutes, I'm not sure how long it is now.

Posted: Fri Jul 26, 2013 8:27 pm
by SilverNexus
Three minutes to time out the metaserver request? That would be a rather long time to wait should the connection not be there. Even one minute would be plenty under almost any circumstances (excluding no internet, so...). My internet is maybe 20 times the speed of dial-up, and it does not take three seconds to contact the metaserver, so even dial-up would be sufficient for the metaserver connection (although why anyone would try to play an online game through dial-up, I'm not sure. I guess if that's all they had, though...).

After checking metaserver.c and metaserver.h on sourceforge, I can say they have not been changed since September 2011. Depending on when "used to" refers to, there may very well still be a three minute timeout (although I have yet to find the timeout in the code).

Posted: Mon Jul 29, 2013 4:42 am
by mwedel
The timeout could/should probably be tweaked.

Note that as a workaround, you can provide the -server option to the client, and it should connect directly to the server provided and bypass the metaserver logic completely.

Posted: Mon Jul 29, 2013 11:07 pm
by SilverNexus
mwedel wrote:Note that as a workaround, you can provide the -server option to the client, and it should connect directly to the server provided and bypass the metaserver logic completely.
Thanks for the tip -- I'll have to use that next time.