mirror of
https://github.com/processone/ejabberd.git
synced 2024-10-31 15:21:38 +01:00
Check a node of a migrating process (EJABS-1908)
This commit is contained in:
parent
f0c745b916
commit
083dfe01ea
@ -221,8 +221,10 @@ stop_or_detach(FsmRef) ->
|
|||||||
end.
|
end.
|
||||||
|
|
||||||
|
|
||||||
migrate(FsmRef, Node, After) ->
|
migrate(FsmRef, Node, After) when node(FsmRef) == node() ->
|
||||||
erlang:send_after(After, FsmRef, {migrate, Node}).
|
erlang:send_after(After, FsmRef, {migrate, Node});
|
||||||
|
migrate(_FsmRef, _Node, _After) ->
|
||||||
|
ok.
|
||||||
|
|
||||||
migrate_shutdown(FsmRef, Node, After) ->
|
migrate_shutdown(FsmRef, Node, After) ->
|
||||||
FsmRef ! {migrate_shutdown, Node, After}.
|
FsmRef ! {migrate_shutdown, Node, After}.
|
||||||
|
@ -117,8 +117,10 @@ start_link(StateName, StateData) ->
|
|||||||
(?GEN_FSM):start_link(?MODULE, [StateName, StateData],
|
(?GEN_FSM):start_link(?MODULE, [StateName, StateData],
|
||||||
?FSMOPTS).
|
?FSMOPTS).
|
||||||
|
|
||||||
migrate(FsmRef, Node, After) ->
|
migrate(FsmRef, Node, After) when node(FsmRef) == node() ->
|
||||||
erlang:send_after(After, FsmRef, {migrate, Node}).
|
erlang:send_after(After, FsmRef, {migrate, Node});
|
||||||
|
migrate(_FsmRef, _Node, _After) ->
|
||||||
|
ok.
|
||||||
|
|
||||||
moderate_room_history(FsmRef, Nick) ->
|
moderate_room_history(FsmRef, Nick) ->
|
||||||
(?GEN_FSM):sync_send_all_state_event(FsmRef,
|
(?GEN_FSM):sync_send_all_state_event(FsmRef,
|
||||||
|
@ -206,8 +206,10 @@ sockname(_Socket) -> {ok, {{0, 0, 0, 0}, 0}}.
|
|||||||
|
|
||||||
peername({http_bind, _FsmRef, IP}) -> {ok, IP}.
|
peername({http_bind, _FsmRef, IP}) -> {ok, IP}.
|
||||||
|
|
||||||
migrate(FsmRef, Node, After) ->
|
migrate(FsmRef, Node, After) when node(FsmRef) == node() ->
|
||||||
erlang:send_after(After, FsmRef, {migrate, Node}).
|
erlang:send_after(After, FsmRef, {migrate, Node});
|
||||||
|
migrate(_FsmRef, _Node, _After) ->
|
||||||
|
ok.
|
||||||
|
|
||||||
process_request(Data, IP, Type) ->
|
process_request(Data, IP, Type) ->
|
||||||
Opts1 = ejabberd_c2s_config:get_c2s_limits(),
|
Opts1 = ejabberd_c2s_config:get_c2s_limits(),
|
||||||
|
Loading…
Reference in New Issue
Block a user