mirror of
https://github.com/processone/ejabberd
synced 2025-10-03 17:59:31 +02:00
Generate log messages when websocket is closed due timeouts
This commit is contained in:
parent
e5f64bc24a
commit
0cfec92c14
1 changed files with 2 additions and 0 deletions
|
@ -241,6 +241,7 @@ handle_info(PingPong, StateName, StateData) when PingPong == ping orelse
|
||||||
StateData2#state{pong_expected = false}};
|
StateData2#state{pong_expected = false}};
|
||||||
handle_info({timeout, Timer, _}, _StateName,
|
handle_info({timeout, Timer, _}, _StateName,
|
||||||
#state{timer = Timer} = StateData) ->
|
#state{timer = Timer} = StateData) ->
|
||||||
|
?DEBUG("Closing websocket connection from hitting inactivity timeout", []),
|
||||||
{stop, normal, StateData};
|
{stop, normal, StateData};
|
||||||
handle_info({timeout, Timer, _}, StateName,
|
handle_info({timeout, Timer, _}, StateName,
|
||||||
#state{ping_timer = Timer, ws = {_, WsPid}} = StateData) ->
|
#state{ping_timer = Timer, ws = {_, WsPid}} = StateData) ->
|
||||||
|
@ -253,6 +254,7 @@ handle_info({timeout, Timer, _}, StateName,
|
||||||
{next_state, StateName,
|
{next_state, StateName,
|
||||||
StateData#state{ping_timer = PingTimer, pong_expected = true}};
|
StateData#state{ping_timer = PingTimer, pong_expected = true}};
|
||||||
true ->
|
true ->
|
||||||
|
?DEBUG("Closing websocket connection from missing pongs", []),
|
||||||
{stop, normal, StateData}
|
{stop, normal, StateData}
|
||||||
end;
|
end;
|
||||||
handle_info(_, StateName, StateData) ->
|
handle_info(_, StateName, StateData) ->
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue