]> granicus.if.org Git - ejabberd/commitdiff
Include condition in http-bind terminate body when service stops (EJAB-792)
authorBadlop <badlop@process-one.net>
Tue, 16 Jun 2009 17:47:12 +0000 (17:47 +0000)
committerBadlop <badlop@process-one.net>
Tue, 16 Jun 2009 17:47:12 +0000 (17:47 +0000)
SVN Revision: 2245

src/web/ejabberd_http_bind.erl

index a3feaf7e79c365436c30948c821296735ca605ce..05468e3a19ee2c1b51f74a75ef03a340b0d7f4d8 100644 (file)
@@ -4,7 +4,7 @@
 %%% Purpose : Implements XMPP over BOSH (XEP-0205) (formerly known as 
 %%%           HTTP Binding)
 %%% Created : 21 Sep 2005 by Stefan Strigler <steve@zeank.in-berlin.de>
-%%% Id      : $Id: ejabberd_http_bind.erl 827 2008-11-21 15:49:09Z jsautret $
+%%% Id      : $Id: ejabberd_http_bind.erl 854 2009-01-12 23:37:40Z badlop $
 %%%----------------------------------------------------------------------
 
 -module(ejabberd_http_bind).
@@ -894,6 +894,8 @@ prepare_response(#http_bind{id=Sid, wait=Wait, hold=Hold}=Sess,
                                ] ++ BOSH_attribs,OutEls})}
                    end
            end;
+       {'EXIT', {shutdown, _}} ->
+            {200, ?HEADER, "<body type='terminate' condition='system-shutdown' xmlns='"++?NS_HTTP_BIND++"'/>"};
        {'EXIT', _Reason} ->
             {200, ?HEADER, "<body type='terminate' xmlns='"++?NS_HTTP_BIND++"'/>"}
     end.