diff --git a/src/java/com/threerings/presents/server/PresentsClient.java b/src/java/com/threerings/presents/server/PresentsClient.java index cfd2ddec4..11f138c55 100644 --- a/src/java/com/threerings/presents/server/PresentsClient.java +++ b/src/java/com/threerings/presents/server/PresentsClient.java @@ -23,6 +23,7 @@ package com.threerings.presents.server; import java.io.IOException; import java.net.InetAddress; +import java.util.Date; import java.util.Map; import java.util.TimeZone; @@ -30,7 +31,8 @@ import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.inject.Inject; -import com.samskivert.util.HashIntMap; +import com.samskivert.util.IntMap; +import com.samskivert.util.IntMaps; import com.samskivert.util.ResultListener; import com.samskivert.util.Throttle; import com.threerings.util.Name; @@ -555,8 +557,10 @@ public class PresentsClient } if (rec != null) { rec.unsubscribe(); + _subhist.put(oid, "Unmapped at " + new Date()); // TEMP } else { - log.warning("Missing subscription in unmap [client=" + this + ", oid=" + oid + "]."); + log.warning("Missing subscription in unmap", "client", this, "oid", oid, + "history", _subhist.get(oid)); } } @@ -566,12 +570,13 @@ public class PresentsClient */ protected void clearSubscrips (boolean verbose) { + String now = new Date().toString(); for (ClientProxy rec : _subscrips.values()) { if (verbose) { - log.info("Clearing subscription [client=" + this + - ", obj=" + rec.object.getOid() + "]."); + log.info("Clearing subscription", "client", this, "obj", rec.object.getOid()); } rec.unsubscribe(); + _subhist.put(rec.object.getOid(), "Cleared at " + now); // TEMP } _subscrips.clear(); } @@ -855,6 +860,7 @@ public class PresentsClient synchronized (_subscrips) { // make a note of this new subscription _subscrips.put(dobj.getOid(), this); + _subhist.put(dobj.getOid(), "Mapped at " + new Date()); // TEMP } subscribedToObject(dobj); @@ -1003,7 +1009,8 @@ public class PresentsClient protected Name _username; protected Connection _conn; protected ClientObject _clobj; - protected HashIntMap _subscrips = new HashIntMap(); + protected IntMap _subscrips = IntMaps.newHashIntMap(); + protected IntMap _subhist = IntMaps.newHashIntMap(); // TEMP protected ClassLoader _loader; /** The time at which this client started their session. */