[CF-Devel] server bug: login loop

Michael Toennies mtx93 at tzi.de
Tue Dec 12 22:44:20 CST 2000


Hi

Some more info about the server bug in the socket/connect part.

I can now kill the server on demand with it, setting it in a inifitive loop
where you can connect but never recieve any data.

It is a socket error.
To kill the server, connect to him, send a version command, wait for getting
the command, break
the connect after you get the version command.

Now the Server writes to his terminal:
CS: connection from client of type  CF DX CLIENT
ReadPacket got an error.: Connection reset by peer
ReadPacket got error 104, returning 0

Now, to kill the server simply try another connect in about 150 ms!!
My client polls the server to a ping, if he has only one server or
you break the connect with esc, he trys the same server fast again.

i put a sleep(250) for the socket init routine... All works fine.
Make it to sleep(<150), the server get killed 100%!

Then he puts out to the terminal:
Waiting for connections...
doeric_serover: error on select: Bad file descriptor (*serover? hey, there
is a bug in the bug msg :) *)
doeric_server: error on select

Well, i am not in the server code, but it should be not so hard to find.

Of course, this explains why server with more or bad connection dies so
often.
In the first case, the chance to get 2 connects in 100 ms with the same
scheme is
higher, in the 2nd case the chance that the connect break and the client
tries again
ist also higher.

All remember that when the server get kills in old days, and you try to
connect after it
fast, you often kills the server in this way?

Thing about it, that makes sense.

MichToen


    
    


More information about the crossfire mailing list