diff --git a/tools/rosmaster/src/rosmaster/registrations.py b/tools/rosmaster/src/rosmaster/registrations.py index 72501779e1..6cbfddf2a7 100644 --- a/tools/rosmaster/src/rosmaster/registrations.py +++ b/tools/rosmaster/src/rosmaster/registrations.py @@ -32,6 +32,7 @@ # # Revision $Id$ +from rosmaster.util import remove_server_proxy from rosmaster.util import xmlrpcapi import rosmaster.exceptions @@ -127,6 +128,7 @@ def shutdown_node_task(api, caller_id, reason): xmlrpcapi(api).shutdown('/master', reason) except: pass #expected in many common cases + remove_server_proxy(api) class Registrations(object): """ diff --git a/tools/rosmaster/src/rosmaster/util.py b/tools/rosmaster/src/rosmaster/util.py index 8e8cd1c70a..e77462952c 100644 --- a/tools/rosmaster/src/rosmaster/util.py +++ b/tools/rosmaster/src/rosmaster/util.py @@ -60,3 +60,7 @@ def xmlrpcapi(uri): _proxies[uri] = ServerProxy(uri) return _proxies[uri] + +def remove_server_proxy(uri): + if uri in _proxies: + del _proxies[uri]