It was for some time now, that we had trouble with some of our qa - Staff not being able to relog to the loginserver after having been disconnected. ONLY the Loginserver. As long as they stayed logged in they could hop from zone to zone at their leisure - the connectionserver handed them nicely from server to server.
The puzzling thing however, was that it only happened on the tc, that it only happened to some of the QA - and only sometimes - and that no one of us could reproduce the issue on our own developement machines.
The initial thought was that it was a threading issue which surfaced as we just ported our entire core from 3rd party libraries like zThread to Boost
Intensive debugging efforts yielded the rather surprising result, that the hash that was constructed out of adress and port was sporting a different value when the session was looked up for destruction than when it was used to look a session up in the session map when a packet arrived.
now.
Adress|(uint64)(port<<32) with adress and port being constant do not have a lot of room for different values. - None to be precise.
OF course, - when someone suspects threading issues, those issues can be used to blame almost anything on them!
So while investigating this issue I came up with a master plan, so that I could ensure that the Adressmap was only accessed from one single thread. Always. ever. - To no avail.
I played with this for 4 Weeks - without any success in resolving the issue.
Until. I found. That the session object. Stored the adress as unsigned integer.
...
For everyone not using Sockets - the Adress as returned by the Socket is a signed integer.
