diff --git a/doc/configuration/listen.md b/doc/configuration/listen.md index 95b87dc1bf5..5d7cd970b23 100644 --- a/doc/configuration/listen.md +++ b/doc/configuration/listen.md @@ -55,7 +55,7 @@ The options listed below can be set for the `c2s`, `s2s` and `service` listeners ### `listen.*.backlog` * **Syntax:** positive integer -* **Default:** `100` +* **Default:** `1024` * **Example:** `backlog = 1000` Overrides the default TCP backlog value. diff --git a/src/c2s/mongoose_c2s_acc.erl b/src/c2s/mongoose_c2s_acc.erl index 9091863212b..ef3be797cd4 100644 --- a/src/c2s/mongoose_c2s_acc.erl +++ b/src/c2s/mongoose_c2s_acc.erl @@ -8,7 +8,7 @@ %% - `actions': a list of valid `gen_statem:action()' to request the `mongoose_c2s' engine. %% - `c2s_state': a new state is requested for the state machine. %% - `c2s_data': a new state data is requested for the state machine. -%% - `stop': an action of type `{info, {stop, Reason}}' is to be triggered. +%% - `stop': an action of type `{cast, {stop, Reason}}' is to be triggered. %% - `hard_stop': no other request is allowed, the state machine is immediatly triggered to stop. %% - `socket_send': xml elements to send on the socket to the user. -module(mongoose_c2s_acc). @@ -68,7 +68,7 @@ new() -> -spec new(params()) -> t(). new(Params = #{stop := Reason}) -> WithoutStop = maps:remove(stop, Params), - NewAction = [{next_event, info, {stop, Reason}}], + NewAction = [{next_event, cast, {stop, Reason}}], Fun = fun(Actions) -> [NewAction | Actions] end, NewParams = maps:update_with(actions, Fun, NewAction, WithoutStop), new(NewParams); @@ -123,7 +123,7 @@ to_c2s_acc(C2SAcc = #{socket_send := Stanzas}, {socket_send, NewStanzas}) when i to_c2s_acc(C2SAcc = #{socket_send := Stanzas}, {socket_send, Stanza}) -> C2SAcc#{socket_send := [Stanza | Stanzas]}; to_c2s_acc(C2SAcc = #{actions := Actions}, {stop, Reason}) -> - C2SAcc#{actions := [{next_event, info, {stop, Reason}} | Actions]}; + C2SAcc#{actions := [{next_event, cast, {stop, Reason}} | Actions]}; to_c2s_acc(C2SAcc, {Key, NewValue}) -> #{Key := _OldValue} = C2SAcc, C2SAcc#{Key := NewValue}. diff --git a/src/mod_presence.erl b/src/mod_presence.erl index 22913c07bd6..77a62fd97c3 100644 --- a/src/mod_presence.erl +++ b/src/mod_presence.erl @@ -96,7 +96,7 @@ user_send_presence(Acc, #{c2s_data := StateData}, _Extra) -> user_receive_presence(Acc, #{c2s_data := StateData}, _Extra) -> case get_mod_state(StateData) of {error, not_found} -> - {ok, Acc}; + {stop, Acc}; Presences -> handle_user_received_presence(Acc, Presences, mongoose_acc:stanza_type(Acc)) end.