Dispatch our client tick on the RunQueue so that it doesn't end up running on a
separate thread and racing against other client actions. Also nixed a pointless type check and cast. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4828 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -386,7 +386,7 @@ public class Client
|
|||||||
// register an interval that we'll use to keep the clock synced and to send pings when
|
// register an interval that we'll use to keep the clock synced and to send pings when
|
||||||
// appropriate
|
// appropriate
|
||||||
if (_tickInterval == null) {
|
if (_tickInterval == null) {
|
||||||
_tickInterval = new Interval() {
|
_tickInterval = new Interval(_runQueue) {
|
||||||
public void expired () {
|
public void expired () {
|
||||||
tick();
|
tick();
|
||||||
}
|
}
|
||||||
@@ -725,9 +725,7 @@ public class Client
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case CLIENT_OBJECT_CHANGED:
|
case CLIENT_OBJECT_CHANGED:
|
||||||
if (obs instanceof SessionObserver) {
|
obs.clientObjectDidChange(Client.this);
|
||||||
((SessionObserver)obs).clientObjectDidChange(Client.this);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CLIENT_CONNECTION_FAILED:
|
case CLIENT_CONNECTION_FAILED:
|
||||||
|
|||||||
Reference in New Issue
Block a user