24
1
mirror of https://github.com/processone/ejabberd.git synced 2024-07-14 23:44:18 +02:00

Closing properly the XMPP websocket process

This commit is contained in:
Eric Cestari 2011-02-14 14:48:02 +01:00
parent 8806fdc1c2
commit d65b785f5d

View File

@ -157,8 +157,11 @@ handle_sync_event({send, Packet}, _From, StateName, #state{ws = WS} = StateData)
end,
%?DEBUG("sending on websocket : ~p ", [Packet2]),
WS:send(Packet2),
{reply, ok, StateName, StateData}.
{reply, ok, StateName, StateData};
handle_sync_event(close, From, _StateName, StateData)->
{stop, normal, StateData}.
handle_info(closed, _StateName, StateData) ->
{stop, normal, StateData};