Skip to content

Commit

Permalink
stream management can stop after handling its unique namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
NelsonVides committed Nov 29, 2022
1 parent e34f581 commit af90cc5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/stream_management/mod_stream_management.erl
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ do_handle_enable(Acc, StateData, false) ->
HostType = mongoose_c2s:get_host_type(StateData),
SmState = build_sm_handler(HostType),
ToAcc = [{state_mod, {?MODULE, SmState}}, {socket_send, Stanza}],
{ok, mongoose_c2s_acc:to_acc_many(Acc, ToAcc)};
{stop, mongoose_c2s_acc:to_acc_many(Acc, ToAcc)};

do_handle_enable(Acc, StateData, true) ->
SMID = make_smid(),
Expand All @@ -505,7 +505,7 @@ do_handle_enable(Acc, StateData, true) ->
Stanza = stream_mgmt_enabled([{<<"id">>, SMID}, {<<"resume">>, <<"true">>}]),
SmState = build_sm_handler(HostType),
ToAcc = [{state_mod, {?MODULE, SmState}}, {socket_send, Stanza}],
{ok, mongoose_c2s_acc:to_acc_many(Acc, ToAcc)}.
{stop, mongoose_c2s_acc:to_acc_many(Acc, ToAcc)}.

-spec handle_resume(mongoose_acc:t(), mongoose_c2s_hooks:params(), exml:element()) ->
mongoose_c2s_hooks:result().
Expand Down

0 comments on commit af90cc5

Please sign in to comment.