This is what seems to be happening: the client requests a subscription

on one connection, then disconnects.  While that request is in the
pipeline, it reconnects, then receives the subcription that the first
connection requested before it sends its own subscription requests.  To
prevent this, make sure that the current connection is the same one
that made the request.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6375 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Andrzej Kapolka
2010-12-10 21:20:47 +00:00
parent 0af27e8475
commit a2f8e4f7d9
@@ -958,6 +958,11 @@ public class PresentsSession
{
public DObject object;
public ClientProxy ()
{
_oconn = getConnection();
}
public void unsubscribe ()
{
object.removeSubscriber(this);
@@ -967,7 +972,8 @@ public class PresentsSession
// from interface ProxySubscriber
public void objectAvailable (DObject dobj)
{
if (postMessage(new ObjectResponse<DObject>(dobj))) {
// ensure that the connection is the same one that requested the subscription
if (getConnection() == _oconn && postMessage(new ObjectResponse<DObject>(dobj))) {
_firstEventId = _omgr.getNextEventId(false);
object = dobj;
ClientProxy orec;
@@ -1021,6 +1027,7 @@ public class PresentsSession
}
protected long _firstEventId;
protected PresentsConnection _oconn;
}
/**