|
Tech Support Trouble running the game? Found a bug? Post here. |
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
JSON ClientAdd/Remove Issue
If a client joins one of my servers, then switches to one of my other servers without disconnecting first, the new server clientAdd entry is processed before the old clientRemove.
I initially join server 1 (port 50006): {"port":50006,"time":78596016,"player":0,"nickname ":"phong","vaporId":"xxx","type":"clientAdd","ip": "xxx:12219"} I hit escape to open the server list while still connected and go directly to another one of my servers (port 50001): {"port":50001,"time":78603527,"player":1,"nickname ":"phong","vaporId":"xxx","type":"clientAdd","ip": "xxx:12219"} {"port":50006,"time":78603803,"player":0,"reason": "Client left.","nickname":"phong","vaporId":"xxx","type":" clientRemove","ip":"xxx:12219"} Is that the normal process? |
#2
|
|||
|
|||
That looks like correct behavior to me. Is it creating a problem for you?
Here's a typical situation that would produce these log entries: 1) Client is playing on server #1, trying to auto-join server #2 which is currently full 2) Client sends an automatic "I want to join #2" message periodically while auto-joining [150 milliseconds later] 3) Server #2 receives join request from client and says "I've got a slot open that you can use, go ahead and connect" -- clientAdd entry appears in server logs as slot is reserved for new client -- notification packet "you're clear to join #2, come on in" is sent to client [150 milliseconds later] 4) Client receives "clear to #2" message, sends server #1 a disconnect message, and begins synching up with server #2 [150 milliseconds later] 5) Server #1 receives disconnect message from client, clientRemove entry appears in server logs |
#3
|
|||
|
|||
I think it makes sense if you think that, the game will try to connect first, see if you can get a spot on the new server and only then disconnect you from the current.
This way, if you try to join a full server, you won't be left hanging on the Server Browser screen. There must be way of asking the server first, but it would fail in case two players tried to join simultaneously. 2c. EDIT: Lamster was faster. |
#4
|
|||
|
|||
That's what I assumed I just wanted to verify. It's a problem with the current code but I'll fix that so no prob, thanks.
Last edited by phong; 02-26-2010 at 09:59 PM. |
|
|