fix(connlib): update the current socket when in idle mode (#9977)

In case we received a newly nominated socket from `str0m` whilst our
connection was in idle mode, we mistakenly did not apply that and kept
using the old one. ICE would still be functioning in this case because
`str0m` would have updated its internal state but we would be sending
packets into Nirvana.

I don't think that this is likely to be hit in production though as it
would be quite unusual to receive a new nomination whilst the connection
was completely idle.
This commit is contained in:
Thomas Eizinger
2025-07-23 15:28:21 +10:00
committed by GitHub
parent 091d5b56e0
commit fafe2c43ea

View File

@@ -2086,7 +2086,9 @@ where
Some(peer_socket)
}
ConnectionState::Idle { peer_socket } => {
self.state = ConnectionState::Idle { peer_socket };
self.state = ConnectionState::Idle {
peer_socket: remote_socket,
};
Some(peer_socket)
}