25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +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}}; StateData#state{waiting_input = From}};
Input -> Input ->
Receiver = From, Receiver = From,
lists:foreach(fun(I) -> lists:foreach(fun(I) when is_binary(I)->
Receiver ! {tcp, StateData#state.socket, I} Receiver ! {tcp, StateData#state.socket, I};
(I2) ->
Receiver ! {tcp, StateData#state.socket, [I2]}
end, Input), end, Input),
{next_state, StateName, {next_state, StateName,
StateData#state{input = [], waiting_input = false, StateData#state{input = [], waiting_input = false,