Skip to content

Commit

Permalink
Fixed the hanging bug... I hope
Browse files Browse the repository at this point in the history
  • Loading branch information
ranok committed Mar 22, 2010
1 parent 2e17e42 commit dbe9bbc
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions src/osp_manager.erl
Original file line number Diff line number Diff line change
Expand Up @@ -163,16 +163,22 @@ stats() ->
stop_servlet(App, Node) ->
case lists:member(Node, [node() | nodes()]) of
true ->
if
Node =:= node() ->
osp_broker:stop(App),
code:purge(App);
true->
rpc:call(Node, osp_broker, stop, [App]),
rpc:call(Node, code, purge, [App])
end,
del_app_from_list(Node, App),
ok;
{Node, LocalHost} = lists:keyfind(Node, 1, nodeapp()),
case lists:keyfind(App, 1, LocalHost) of
false ->
error;
_ ->
if
Node =:= node() ->
osp_broker:stop(App),
code:purge(App);
true->
rpc:call(Node, osp_broker, stop, [App]),
rpc:call(Node, code, purge, [App])
end,
del_app_from_list(Node, App),
ok
end;
false ->
error
end.
Expand Down

0 comments on commit dbe9bbc

Please sign in to comment.