mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-26 17:38:45 +01:00
Use websocket pings also on old style connections
This commit is contained in:
parent
dc0934bff7
commit
3a5dd51b42
@ -263,10 +263,9 @@ setup_timers(StateData) ->
|
||||
Timer = erlang:start_timer(StateData#state.timeout,
|
||||
self(), []),
|
||||
cancel_timer(StateData#state.ping_timer),
|
||||
PingTimer = case {StateData#state.ping_interval, StateData#state.rfc_compilant} of
|
||||
{0, _} -> StateData#state.ping_timer;
|
||||
{_, false} -> StateData#state.ping_timer;
|
||||
{V, _} -> erlang:start_timer(V, self(), [])
|
||||
PingTimer = case StateData#state.ping_interval of
|
||||
0 -> StateData#state.ping_timer;
|
||||
V -> erlang:start_timer(V, self(), [])
|
||||
end,
|
||||
StateData#state{timer = Timer, ping_timer = PingTimer,
|
||||
pong_expected = false}.
|
||||
|
Loading…
Reference in New Issue
Block a user