25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-30 16:36:29 +01:00

When client is closed, include the Reason in the stream trailer stanza.

SVN Revision: 2154
This commit is contained in:
Badlop 2009-06-09 12:10:24 +00:00
parent 60f52b2cd8
commit 8de03275c3

View File

@ -1186,6 +1186,9 @@ handle_info({route, From, To, Packet}, StateName, StateData) ->
end, end,
if if
Pass == exit -> Pass == exit ->
%% When Pass==exit, NewState contains a string instead of a #state{}
Lang = StateData#state.lang,
catch send_element(StateData, exmpp_stream:error('undefined-condition', {Lang, NewState})),
catch send_element(StateData, exmpp_stream:closing()), catch send_element(StateData, exmpp_stream:closing()),
{stop, normal, StateData}; {stop, normal, StateData};
Pass -> Pass ->