Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C2s/quickfixes #3797

Merged
merged 3 commits into from
Oct 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/configuration/listen.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions src/c2s/mongoose_c2s_acc.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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}.
2 changes: 1 addition & 1 deletion src/mod_presence.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down