ejabberd_c2s: Close socket when waiting for resume

Make sure the socket is closed when mod_ping calls ejabberd_c2s:stop/1
for an XEP-0198 session.
This commit is contained in:
Holger Weiss 2015-10-17 22:07:29 +02:00
parent 70606667c6
commit 53bd0ee818
1 changed files with 1 additions and 0 deletions

View File

@ -1202,6 +1202,7 @@ session_established({xmlstreamerror, _}, StateData) ->
send_trailer(StateData),
{stop, normal, StateData};
session_established(closed, #state{mgmt_state = active} = StateData) ->
catch (StateData#state.sockmod):close(StateData#state.socket),
fsm_next_state(wait_for_resume, StateData);
session_established(closed, StateData) ->
{stop, normal, StateData}.