Disconnect the client side when we disconnect on the backend so that we don't
end up differing in opinion about whether or not we're connected. git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@456 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
@@ -613,6 +613,7 @@ public class EZGameControl extends BaseControl
|
||||
*/
|
||||
protected function populateProperties (o :Object) :void
|
||||
{
|
||||
o["connectionClosed_v1"] = connectionClosed_v1;
|
||||
o["propertyWasSet_v1"] = propertyWasSet_v1;
|
||||
o["controlDidChange_v1"] = controlDidChange_v1;
|
||||
o["turnDidChange_v1"] = turnDidChange_v1;
|
||||
@@ -624,6 +625,14 @@ public class EZGameControl extends BaseControl
|
||||
o["userChat_v1"] = userChat_v1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Private method called when the backend disconnects from us.
|
||||
*/
|
||||
private function connectionClosed_v1 () :void
|
||||
{
|
||||
_gameData = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Private method to post a PropertyChangedEvent.
|
||||
*/
|
||||
|
||||
@@ -129,6 +129,7 @@ public class GameControlBackend
|
||||
_ctx.getChatDirector().removeChatDisplay(this);
|
||||
_ctx.getClient().getClientObject().removeListener(_userListener);
|
||||
_userFuncs = null; // disconnect
|
||||
callUserCode("connectionClosed_v1");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user