Include the attribute clear in the compound event. We're getting some weird
errors with duplicate receiver entries on reconnect in Spiral Knights, and I'm hoping this will fix them. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6301 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -79,9 +79,6 @@ public class InvocationDirector
|
|||||||
// add ourselves as an event listener
|
// add ourselves as an event listener
|
||||||
clobj.addListener(InvocationDirector.this);
|
clobj.addListener(InvocationDirector.this);
|
||||||
|
|
||||||
// clear out our previous registrations
|
|
||||||
clobj.setReceivers(new DSet<Registration>());
|
|
||||||
|
|
||||||
// keep a handle on this bad boy
|
// keep a handle on this bad boy
|
||||||
_clobj = clobj;
|
_clobj = clobj;
|
||||||
|
|
||||||
@@ -160,6 +157,25 @@ public class InvocationDirector
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when we log on; generates mappings for all receivers registered prior to logon.
|
||||||
|
*/
|
||||||
|
protected void assignReceiverIds ()
|
||||||
|
{
|
||||||
|
// pack all the events into a single transaction
|
||||||
|
_clobj.startTransaction();
|
||||||
|
try {
|
||||||
|
// clear out our previous registrations
|
||||||
|
_clobj.setReceivers(new DSet<Registration>());
|
||||||
|
|
||||||
|
for (InvocationDecoder decoder : _reclist) {
|
||||||
|
assignReceiverId(decoder);
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
_clobj.commitTransaction();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Assigns a receiver id to this decoder and publishes it in the {@link ClientObject#receivers}
|
* Assigns a receiver id to this decoder and publishes it in the {@link ClientObject#receivers}
|
||||||
* field.
|
* field.
|
||||||
@@ -174,22 +190,6 @@ public class InvocationDirector
|
|||||||
// Log.info("Registered receiver " + StringUtil.shortClassName(decoder) + " " + reg + ".");
|
// Log.info("Registered receiver " + StringUtil.shortClassName(decoder) + " " + reg + ".");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Called when we log on; generates mappings for all receivers registered prior to logon.
|
|
||||||
*/
|
|
||||||
protected void assignReceiverIds ()
|
|
||||||
{
|
|
||||||
// pack all the set add events into a single transaction
|
|
||||||
_clobj.startTransaction();
|
|
||||||
try {
|
|
||||||
for (InvocationDecoder decoder : _reclist) {
|
|
||||||
assignReceiverId(decoder);
|
|
||||||
}
|
|
||||||
} finally {
|
|
||||||
_clobj.commitTransaction();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Requests that the specified invocation request be packaged up and sent to the supplied
|
* Requests that the specified invocation request be packaged up and sent to the supplied
|
||||||
* invocation oid.
|
* invocation oid.
|
||||||
|
|||||||
Reference in New Issue
Block a user