From 9a6e3e9fe9087052981e6eaba5b064c74c775207 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Fri, 7 Nov 2008 03:14:46 +0000 Subject: [PATCH] Temporary fix for the local server timing out outgoing connections. I don't think it should be needed but I need to do more testing, post-bling. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5517 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../threerings/presents/server/net/ServerCommunicator.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/java/com/threerings/presents/server/net/ServerCommunicator.java b/src/java/com/threerings/presents/server/net/ServerCommunicator.java index 5c54b1550..f00ba9cab 100644 --- a/src/java/com/threerings/presents/server/net/ServerCommunicator.java +++ b/src/java/com/threerings/presents/server/net/ServerCommunicator.java @@ -63,6 +63,13 @@ public class ServerCommunicator extends Communicator // we assume server entities have no firewall issues and can connect on the first port try { Connection conn = new Connection() { + @Override public void postMessage (Message msg) { + super.postMessage(msg); + // outgoing traffic on this connection is used to prevent idleness + _lastEvent = System.currentTimeMillis(); + // TODO: shouldn't PongResponse handle this? + } + @Override public void connectFailure (IOException ioe) { _logonError = ioe; // report this as a logon failure super.connectFailure(ioe);