We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 7c9eec9 + ba6e05b commit be06a46Copy full SHA for be06a46
1 file changed
lightway-core/src/connection.rs
@@ -1353,7 +1353,11 @@ impl<AppState: Send> Connection<AppState> {
1353
}
1354
1355
fn handle_pong(&mut self, pong: wire::Pong) -> ConnectionResult<()> {
1356
- info!(id = pong.id, "Received pong");
+ if !matches!(self.state, State::Online) {
1357
+ return Err(ConnectionError::InvalidState);
1358
+ }
1359
+
1360
+ debug!(id = pong.id, "Received pong");
1361
if pong.id == 0 {
1362
self.event(Event::KeepaliveReply);
1363
0 commit comments