diff --git a/src/connections.rs b/src/connections.rs index 292b9d4..1c4c7c8 100644 --- a/src/connections.rs +++ b/src/connections.rs @@ -100,7 +100,9 @@ impl conn.last_recv_pong { + let interval = if conn.last_sent_ping > conn.last_recv_pong + && conn.state == ConnectionState::Connected + { self.config.max_ping_interval } else { self.config.ping_interval @@ -309,6 +311,8 @@ impl