Unregister the Pid for the interceptor leader before reregistering it

This commit is contained in:
Brett Hazen 2015-04-01 20:26:02 -06:00
parent 2151fa6914
commit 17b5ac8f80

View File

@ -16,6 +16,7 @@ leader_server(Node) ->
set_leader_node(Node) ->
LeaderPid = spawn(?MODULE, leader_server, [Node]),
global:unregister_name(?NODE_KEY),
global:register_name(?NODE_KEY, LeaderPid).
set_leader_node(LocalPid, LeaderNode, LeaderPid) ->