mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-22 17:28:25 +01:00
Handle TCP errors in websockets
This commit is contained in:
parent
e427358e08
commit
4b6f1195c6
@ -203,6 +203,9 @@ ws_loop(FrameInfo, Socket, WsHandleLoopPid, SocketMode) ->
|
||||
{tcp_closed, _Socket} ->
|
||||
?DEBUG("tcp connection was closed, exit", []),
|
||||
websocket_close(Socket, WsHandleLoopPid, SocketMode, 0);
|
||||
{tcp_error, Socket, Reason} ->
|
||||
?DEBUG("tcp connection error: ~s", [inet:format_error(Reason)]),
|
||||
websocket_close(Socket, WsHandleLoopPid, SocketMode, 0);
|
||||
{'DOWN', Ref, process, WsHandleLoopPid, Reason} ->
|
||||
Code = case Reason of
|
||||
normal ->
|
||||
|
Loading…
Reference in New Issue
Block a user