25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +01:00

Improve functions calls when closing client connection.

SVN Revision: 2905
This commit is contained in:
Badlop 2010-01-15 12:02:15 +00:00
parent 13220d44f4
commit a9fba750fa

View File

@ -132,8 +132,6 @@
"id='~s' from='~s'~s~s>" "id='~s' from='~s'~s~s>"
). ).
-define(STREAM_TRAILER, "</stream:stream>").
-define(INVALID_NS_ERR, exmpp_stream:error('invalid-namespace')). -define(INVALID_NS_ERR, exmpp_stream:error('invalid-namespace')).
-define(INVALID_XML_ERR, exmpp_stream:error('xml-not-well-formed')). -define(INVALID_XML_ERR, exmpp_stream:error('xml-not-well-formed')).
-define(HOST_UNKNOWN_ERR, exmpp_stream:error('host-unknown')). -define(HOST_UNKNOWN_ERR, exmpp_stream:error('host-unknown')).
@ -1263,11 +1261,11 @@ handle_info(system_shutdown, StateName, StateData) ->
wait_for_stream -> wait_for_stream ->
send_header(StateData#state.streamid, ?MYNAME, "1.0", ""), send_header(StateData#state.streamid, ?MYNAME, "1.0", ""),
send_element(StateData, exmpp_stream:error('system-shutdown')), send_element(StateData, exmpp_stream:error('system-shutdown')),
send_text(StateData, ?STREAM_TRAILER), send_trailer(StateData),
ok; ok;
_ -> _ ->
send_element(StateData, exmpp_stream:error('system-shutdown')), send_element(StateData, exmpp_stream:error('system-shutdown')),
send_text(StateData, ?STREAM_TRAILER), send_trailer(StateData),
ok ok
end, end,
{stop, normal, StateData}; {stop, normal, StateData};