From 8732817c3cb770f948404a4a481667d286541c7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Chmielowski?= Date: Thu, 9 Apr 2015 13:35:37 +0200 Subject: [PATCH] Fix problem with pushing bufferend #xmlel-s to receiver in websocket code --- src/ejabberd_http_ws.erl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ejabberd_http_ws.erl b/src/ejabberd_http_ws.erl index 0808ffd97..a0cc31e2a 100644 --- a/src/ejabberd_http_ws.erl +++ b/src/ejabberd_http_ws.erl @@ -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,