draft
This commit is contained in:
parent
9da6231702
commit
918de5941b
1 changed files with 2 additions and 2 deletions
|
@ -23,9 +23,9 @@ websocket_handle({text, <<Data/binary>>}, 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}.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue