Report a bit more information in these strange edge cases.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5292 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2008-08-05 12:49:40 +00:00
parent beadc8745c
commit 5c664a2667
@@ -465,19 +465,20 @@ public class ClientManager
protected void clientSessionDidEnd (final PresentsClient client) protected void clientSessionDidEnd (final PresentsClient client)
{ {
// remove the client from the username map // remove the client from the username map
Name username = client.getCredentials().getUsername();
PresentsClient rc; PresentsClient rc;
synchronized (_usermap) { synchronized (_usermap) {
rc = _usermap.remove(client.getCredentials().getUsername()); rc = _usermap.remove(username);
} }
// sanity check just because we can // sanity check just because we can
if (rc == null) { if (rc == null) {
log.warning("Unregistered client ended session " + client + ".", new Exception()); log.warning("Unregistered client ended session", "username", username, "client", client,
new Exception());
} else if (rc != client) { } else if (rc != client) {
log.warning("Different clients with same username!? " + log.warning("Different clients with same username!?", "c1", rc, "c2", client);
"[c1=" + rc + ", c2=" + client + "].");
} else { } else {
log.info("Ending session " + client + "."); log.info("Ending session", "username", username, "client", client);
} }
// notify the observers that the session is ended // notify the observers that the session is ended