Skip to content

Commit

Permalink
Remove long comment from create_session function
Browse files Browse the repository at this point in the history
  • Loading branch information
arcusfelis committed Mar 29, 2023
1 parent fecbf85 commit 9a62331
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/ejabberd_sm_cets.erl
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,7 @@ create_session(User, Server, Resource, Session) ->
[] ->
cets:insert(?TABLE, session_to_tuple(Session));
Sessions when is_list(Sessions) ->
%% Fix potential race condition during XMPP bind, where
%% multiple calls (> 2) to ejabberd_sm:open_session
%% have been made, resulting in >1 sessions for this resource
%% XXX Why do we need that exactly?
%% Sessions are open from c2s and that specific process is updating
%% its session info. Adding info from other processes would cause some
%% strange bugs. On another hand, there is very limited usage
%% of that info field, so nothing would probably break if
%% we keep calling merge_info (and it would make ejabberd_sm_SUITE happy).
%% TODO merge_info function would be removed, once MIM-1875 is done
MergedSession = mongoose_session:merge_info
(Session, hd(lists:sort(Sessions))),
cets:insert(?TABLE, session_to_tuple(MergedSession))
Expand Down

0 comments on commit 9a62331

Please sign in to comment.