Let's make it easy for anyone to indicate their expected connection, and use it
to suppress subscription failure events in addition to subscription success, as well as event forwards (though those shouldn't, in theory, go out over a new connection because subscribers are cleared when a connection is dropped). Nothing else looked like it might result in a spurious message being sent if a connection was dropped and reestablished, so none of the other calls were made to supply an expected connection. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6376 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -32,6 +32,7 @@ import com.threerings.presents.net.Message;
|
||||
import com.threerings.presents.peer.data.NodeObject;
|
||||
import com.threerings.presents.peer.net.PeerBootstrapData;
|
||||
import com.threerings.presents.server.PresentsSession;
|
||||
import com.threerings.presents.server.net.PresentsConnection;
|
||||
|
||||
import static com.threerings.presents.Log.log;
|
||||
|
||||
@@ -115,9 +116,9 @@ public class PeerSession extends PresentsSession
|
||||
}
|
||||
|
||||
@Override // from PresentsSession
|
||||
protected final boolean postMessage (DownstreamMessage msg)
|
||||
protected final boolean postMessage (DownstreamMessage msg, PresentsConnection expect)
|
||||
{
|
||||
if (!super.postMessage(msg)) {
|
||||
if (!super.postMessage(msg, expect)) {
|
||||
return false;
|
||||
}
|
||||
_stats.peerMessagesOut++;
|
||||
|
||||
Reference in New Issue
Block a user