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

Fix problem with pushing bufferend #xmlel-s to receiver in websocket code

This commit is contained in:
Paweł Chmielowski 2015-04-09 13:35:37 +02:00
parent f129c6530c
commit 8732817c3c

View File

@ -138,8 +138,10 @@ handle_event({activate, From}, StateName, StateData) ->
StateData#state{waiting_input = From}};
Input ->
Receiver = From,
lists:foreach(fun(I) ->
Receiver ! {tcp, StateData#state.socket, I}
lists:foreach(fun(I) when is_binary(I)->
Receiver ! {tcp, StateData#state.socket, I};
(I2) ->
Receiver ! {tcp, StateData#state.socket, [I2]}
end, Input),
{next_state, StateName,
StateData#state{input = [], waiting_input = false,