If we request to invoke an action directly on a node, do the right thing if
that node is us. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5380 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -359,6 +359,8 @@ public abstract class PeerManager
|
|||||||
PeerNode peer = _peers.get(nodeName);
|
PeerNode peer = _peers.get(nodeName);
|
||||||
if (peer != null) {
|
if (peer != null) {
|
||||||
peer.nodeobj.peerService.invokeAction(peer.getClient(), flattenAction(action));
|
peer.nodeobj.peerService.invokeAction(peer.getClient(), flattenAction(action));
|
||||||
|
} else if (nodeName.equals(_nodeName)) {
|
||||||
|
invokeAction(null, flattenAction(action));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -695,6 +697,10 @@ public abstract class PeerManager
|
|||||||
// from interface ShutdownManager.Shutdowner
|
// from interface ShutdownManager.Shutdowner
|
||||||
public void shutdown ()
|
public void shutdown ()
|
||||||
{
|
{
|
||||||
|
if (_nodeName == null) { // sanity check
|
||||||
|
throw new IllegalStateException("Shutting down PeerManager that was never initialized.");
|
||||||
|
}
|
||||||
|
|
||||||
// clear out our invocation service
|
// clear out our invocation service
|
||||||
if (_nodeobj != null) {
|
if (_nodeobj != null) {
|
||||||
_invmgr.clearDispatcher(_nodeobj.peerService);
|
_invmgr.clearDispatcher(_nodeobj.peerService);
|
||||||
|
|||||||
Reference in New Issue
Block a user