mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-26 16:26:24 +01:00
Improve functions calls when closing client connection.
SVN Revision: 2905
This commit is contained in:
parent
13220d44f4
commit
a9fba750fa
@ -132,8 +132,6 @@
|
||||
"id='~s' from='~s'~s~s>"
|
||||
).
|
||||
|
||||
-define(STREAM_TRAILER, "</stream:stream>").
|
||||
|
||||
-define(INVALID_NS_ERR, exmpp_stream:error('invalid-namespace')).
|
||||
-define(INVALID_XML_ERR, exmpp_stream:error('xml-not-well-formed')).
|
||||
-define(HOST_UNKNOWN_ERR, exmpp_stream:error('host-unknown')).
|
||||
@ -1263,11 +1261,11 @@ handle_info(system_shutdown, StateName, StateData) ->
|
||||
wait_for_stream ->
|
||||
send_header(StateData#state.streamid, ?MYNAME, "1.0", ""),
|
||||
send_element(StateData, exmpp_stream:error('system-shutdown')),
|
||||
send_text(StateData, ?STREAM_TRAILER),
|
||||
send_trailer(StateData),
|
||||
ok;
|
||||
_ ->
|
||||
send_element(StateData, exmpp_stream:error('system-shutdown')),
|
||||
send_text(StateData, ?STREAM_TRAILER),
|
||||
send_trailer(StateData),
|
||||
ok
|
||||
end,
|
||||
{stop, normal, StateData};
|
||||
|
Loading…
Reference in New Issue
Block a user