From a9fba750fa3018e510957a28847005491ed705cf Mon Sep 17 00:00:00 2001 From: Badlop Date: Fri, 15 Jan 2010 12:02:15 +0000 Subject: [PATCH] Improve functions calls when closing client connection. SVN Revision: 2905 --- src/ejabberd_c2s.erl | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/ejabberd_c2s.erl b/src/ejabberd_c2s.erl index 181186c6a..e11873cab 100644 --- a/src/ejabberd_c2s.erl +++ b/src/ejabberd_c2s.erl @@ -132,8 +132,6 @@ "id='~s' from='~s'~s~s>" ). --define(STREAM_TRAILER, ""). - -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};