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:
@@ -1053,7 +1053,9 @@ public class PresentsSession
|
|||||||
{
|
{
|
||||||
// send a pong response using the transport with which the message was received
|
// send a pong response using the transport with which the message was received
|
||||||
PingRequest req = (PingRequest)msg;
|
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()));
|
client.safePostMessage(new PongResponse(req.getUnpackStamp(), req.getTransport()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1123,6 +1125,9 @@ public class PresentsSession
|
|||||||
* ended. */
|
* ended. */
|
||||||
protected static final long FLUSH_TIME = 7 * 60 * 1000L;
|
protected static final long FLUSH_TIME = 7 * 60 * 1000L;
|
||||||
|
|
||||||
|
// TEMP
|
||||||
|
protected static final boolean PING_DEBUG = Boolean.getBoolean("ping_debug");
|
||||||
|
|
||||||
// register our message dispatchers
|
// register our message dispatchers
|
||||||
static {
|
static {
|
||||||
_disps.put(SubscribeRequest.class, new SubscribeDispatcher());
|
_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
|
// outgoing traffic on this connection is used to prevent idleness
|
||||||
// TODO: shouldn't PongResponse handle this?
|
// TODO: shouldn't PongResponse handle this?
|
||||||
_lastEvent = System.currentTimeMillis();
|
_lastEvent = System.currentTimeMillis();
|
||||||
// TEMP: debug
|
if (PING_DEBUG && msg instanceof PingRequest) { // TEMP
|
||||||
if (msg instanceof PingRequest) {
|
|
||||||
log.info("Pinging on server comm " + msg);
|
log.info("Pinging on server comm " + msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -205,4 +204,7 @@ public class ServerCommunicator extends Communicator
|
|||||||
protected ClientDObjectMgr _omgr;
|
protected ClientDObjectMgr _omgr;
|
||||||
protected ClassLoader _loader;
|
protected ClassLoader _loader;
|
||||||
protected Exception _logonError;
|
protected Exception _logonError;
|
||||||
|
|
||||||
|
// TEMP
|
||||||
|
protected static final boolean PING_DEBUG = Boolean.getBoolean("ping_debug");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user