diff --git a/src/wsio_handler.erl b/src/wsio_handler.erl index 7d8c847..affaa98 100644 --- a/src/wsio_handler.erl +++ b/src/wsio_handler.erl @@ -23,9 +23,9 @@ websocket_handle({text, <>}, S) -> {ok, S} end; websocket_handle({json, #{<<"ref">> := Ref}}, #{wsbus := nil} = S) -> - {[{text, jsx:encode(#{<<"ref">> => Ref, <<"wsio-code">> => 0})}], S}; + {[{text, jsx:encode(#{<<"ref">> => Ref, <<"wsio-code">> => <<"0">>})}], S}; websocket_handle({json, Data}, #{wsbus := BUS} = S) -> - gen_server:cast(BUS, {call, Data, self()}), + gen_server:cast(BUS, {call, Data}), {ok, S}; websocket_handle(_, State) -> {ok, State}.