Stop our peer refresher interval when we are shut down.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5000 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -234,13 +234,8 @@ public class PeerManager
|
||||
// register ourselves as a client observer
|
||||
PresentsServer.clmgr.addClientObserver(this);
|
||||
|
||||
// and start our peer refresh interval (this need not use a runqueue as all it will do is
|
||||
// post an invoker unit)
|
||||
new Interval() {
|
||||
public void expired () {
|
||||
refreshPeers();
|
||||
}
|
||||
}.schedule(5000L, 60*1000L);
|
||||
// and start our peer refresh interval
|
||||
_peerRefresher.schedule(5000L, 60*1000L);
|
||||
|
||||
// give derived classes an easy way to get in on the init action
|
||||
didInit();
|
||||
@@ -700,6 +695,9 @@ public class PeerManager
|
||||
PresentsServer.invmgr.clearDispatcher(_nodeobj.peerService);
|
||||
}
|
||||
|
||||
// stop our peer refresher interval
|
||||
_peerRefresher.cancel();
|
||||
|
||||
// clear out our client observer registration
|
||||
PresentsServer.clmgr.removeClientObserver(this);
|
||||
|
||||
@@ -1207,6 +1205,13 @@ public class PeerManager
|
||||
protected NodeObject _nodeobj;
|
||||
protected HashMap<String,PeerNode> _peers = new HashMap<String,PeerNode>();
|
||||
|
||||
// (this need not use a runqueue as all it will do is post an invoker unit)
|
||||
protected Interval _peerRefresher = new Interval() {
|
||||
public void expired () {
|
||||
refreshPeers();
|
||||
}
|
||||
};
|
||||
|
||||
/** The client oids of all peers subscribed to the node object. */
|
||||
protected ArrayIntSet _suboids = new ArrayIntSet();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user