Make the ping debugging optional since dev seems not to be failing now.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5602 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2008-12-12 20:41:19 +00:00
parent 8b177eea6f
commit 91f1a3f893
2 changed files with 10 additions and 3 deletions
@@ -1053,7 +1053,9 @@ public class PresentsSession
{
// send a pong response using the transport with which the message was received
PingRequest req = (PingRequest)msg;
log.info("Got ping, ponging", "client", client._username);
if (PING_DEBUG) {
log.info("Got ping, ponging", "client", client._username);
}
client.safePostMessage(new PongResponse(req.getUnpackStamp(), req.getTransport()));
}
}
@@ -1123,6 +1125,9 @@ public class PresentsSession
* ended. */
protected static final long FLUSH_TIME = 7 * 60 * 1000L;
// TEMP
protected static final boolean PING_DEBUG = Boolean.getBoolean("ping_debug");
// register our message dispatchers
static {
_disps.put(SubscribeRequest.class, new SubscribeDispatcher());
@@ -69,8 +69,7 @@ public class ServerCommunicator extends Communicator
// outgoing traffic on this connection is used to prevent idleness
// TODO: shouldn't PongResponse handle this?
_lastEvent = System.currentTimeMillis();
// TEMP: debug
if (msg instanceof PingRequest) {
if (PING_DEBUG && msg instanceof PingRequest) { // TEMP
log.info("Pinging on server comm " + msg);
}
}
@@ -205,4 +204,7 @@ public class ServerCommunicator extends Communicator
protected ClientDObjectMgr _omgr;
protected ClassLoader _loader;
protected Exception _logonError;
// TEMP
protected static final boolean PING_DEBUG = Boolean.getBoolean("ping_debug");
}