Originally posted by [b]theultramage[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=1330
I found a glitch in the mapserver login procedure. It goes like this:
1. log into account/char with client A
2. try log into account/char with client B
3. after getting the "already online" notice, immediately try to log in with client B again and go ingame
4. you should get a "disconnected from server" message a second or two afterwards.
I finally traced this problem to the following location:
CODE
static int clif_waitclose(int tid, unsigned int tick, int id, int data)
{
if (session[id] && session[id]->func_parse == clif_parse) //Avoid disconnecting non-players
> set_eof(id);
return 0;
}
I have several questions:
- Why is there a 'delayed' disconnect mechanism? Why does there have to be a timer to close the socket, when it should be done immediately? I checked it, and after 5 seconds of waiting, the session to be closed is no longer there because it has been closed elsewhere already!
- This thing is very error prone, because 5 seconds is more then enough for a new, separate session to acquire this fd - which would cause random players to get disconnects.
- Who are these 'non-players'? (EDIT: Skotlex clarified that these are the char-server connections)
This post has been edited by theultramage: Apr 7 2008, 06:09 AM