25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +01:00

Improve functions calls when closing client connection.

SVN Revision: 2904
This commit is contained in:
Badlop 2010-01-15 12:01:12 +00:00
parent 7aff5defac
commit 3e4858f348

View File

@ -1307,15 +1307,13 @@ handle_info({'DOWN', Monitor, _Type, _Object, _Info}, _StateName, StateData)
handle_info(system_shutdown, StateName, StateData) ->
case StateName of
wait_for_stream ->
Header = io_lib:format(?STREAM_HEADER,
["none", ?MYNAME, " version='1.0'", ""]),
send_text(StateData, Header),
send_header(StateData, ?MYNAME, "1.0", "en"),
send_element(StateData, ?SERR_SYSTEM_SHUTDOWN),
send_text(StateData, ?STREAM_TRAILER),
send_trailer(StateData),
ok;
_ ->
send_element(StateData, ?SERR_SYSTEM_SHUTDOWN),
send_text(StateData, ?STREAM_TRAILER),
send_trailer(StateData),
ok
end,
{stop, normal, StateData};