closing connection on wsbus terminate
This commit is contained in:
parent
918de5941b
commit
5ff6b28bcf
1 changed files with 1 additions and 1 deletions
|
@ -42,7 +42,7 @@ websocket_info({send, <<Bin/binary>>}, S) ->
|
||||||
websocket_info({send, List}, S) when is_list(List) ->
|
websocket_info({send, List}, S) when is_list(List) ->
|
||||||
{List, S};
|
{List, S};
|
||||||
websocket_info({'DOWN', _, process, PID, _}, #{wsbus := PID} = S) ->
|
websocket_info({'DOWN', _, process, PID, _}, #{wsbus := PID} = S) ->
|
||||||
{ok, S#{wsbus => nil, ref_wsbus => st:lookup(wsbus)}};
|
{[close], S};
|
||||||
websocket_info({_, {send, _} = Msg}, S) ->
|
websocket_info({_, {send, _} = Msg}, S) ->
|
||||||
websocket_info(Msg, S);
|
websocket_info(Msg, S);
|
||||||
websocket_info({_, {Ref, {error, notfound}}}, #{ref_wsbus := Ref} = S) ->
|
websocket_info({_, {Ref, {error, notfound}}}, #{ref_wsbus := Ref} = S) ->
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue