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

Fix issue #1078: ejabberd_c2s process didn't clear session data in some case #1083

Closed
wants to merge 1 commit into from

Conversation

yzf
Copy link

@yzf yzf commented Apr 22, 2016

Notice that, send_element/2 will call exit/1 if the connection is closed,
So, if create session data before response bind-iq-result,
the ejabberd_c2s process may jump into terminate/3 without update state data.
As a result, it wouldn't delete the session data.

More details, see #1078

In short, we should call send_element/2 before ejabberd_sm:open_session.

Notice that, `send_element/2` will call `exit/1` if the connection is closed,
So, if create session data before response bind-iq-result,
the ejabberd_c2s process may jump into `terminate/3` without update state data.
As a result, it wouldn't delete the session data.
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.06%) to 31.398% when pulling bf7b68c on yzf:fix_session_left_behind into 2660dca on processone:master.

@zinid
Copy link
Contributor

zinid commented May 9, 2016

This has been fixed in a different way. Thanks for your contribution anyway!

@zinid zinid closed this May 9, 2016
@lock
Copy link

lock bot commented Jun 10, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants