Closed iiegor closed 8 years ago
This happens because disconnection of duplicated client handles after j2 dispatching.
Look: Let's say we are using profile with id 123
so what do we have? there is no 123 user in clients array.
The way to fix: set client.id to dummy value after raising socket.end(). for ex.: client.id = -(1<<31)
Looks.. bad. But works.
check out the other, better way to fix it. huumanoid/xat-server@4cf61cdbd43dbc8319ab7477b7cb4a9484f81d29 it's better because fix other two bugs related with dup handling.
Hey @HuuMaNoID, thanks for the info, I solved this by another way (see on branch improve/client-management), what do you think?
Your solution looks OK.
Preview
Details
This issue appeared since the introduction of c2f440740fcbeef86703f326fc85ade2443a1a43. Probably related with handler.coffee#L64 and server.coffee#L39.