We're getting datagram PONGs on resumed connections that haven't yet sent
datagram PINGs. Let's make sure that the connection to which we're sending the pong is the same one from which we received the ping. Ping, pong, ping, pong. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6618 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -874,11 +874,21 @@ public class PresentsSession
|
||||
* Callable from non-dobjmgr thread, this queues up a runnable on the dobjmgr thread to post
|
||||
* the supplied message to this client.
|
||||
*/
|
||||
protected final void safePostMessage (final DownstreamMessage msg)
|
||||
protected final void safePostMessage (DownstreamMessage msg)
|
||||
{
|
||||
safePostMessage(msg, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callable from non-dobjmgr thread, this queues up a runnable on the dobjmgr thread to post
|
||||
* the supplied message to this client.
|
||||
*/
|
||||
protected final void safePostMessage (
|
||||
final DownstreamMessage msg, final PresentsConnection expect)
|
||||
{
|
||||
_omgr.postRunnable(new Runnable() {
|
||||
public void run () {
|
||||
postMessage(msg, null);
|
||||
postMessage(msg, expect);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -1165,7 +1175,8 @@ public class PresentsSession
|
||||
if (PING_DEBUG) {
|
||||
log.info("Got ping, ponging", "client", client.getAuthName());
|
||||
}
|
||||
client.safePostMessage(new PongResponse(req.getUnpackStamp(), req.getTransport()));
|
||||
client.safePostMessage(new PongResponse(req.getUnpackStamp(), req.getTransport()),
|
||||
client.getConnection());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user