fix(connlib): clear join requests on reconnect - #9985
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
jamilbk
left a comment
There was a problem hiding this comment.
Good catch. I think I've hit this one too but hard to reproduce. I added changelogs.
There was a problem hiding this comment.
I believed I just managed to reproduce this locally.
firezone_tunnel::unique_packet_buffer: Buffering packet tag=pending-flow-resources is_full=false packet=Packet { src: 100.82.80.16, dst: 1.1.1.1, protocol: "ICMP", icmp_type: EchoRequest(IcmpEchoHeader { id: 35907, seq: 157 }) } resource=...
firezone_tunnel::unique_packet_buffer: Buffering packet tag=pending-flow-resources is_full=false packet=Packet { src: 100.82.80.16, dst: 1.1.1.1, protocol: "ICMP", icmp_type: EchoRequest(IcmpEchoHeader { id: 35907, seq: 158 }) } resource=...
firezone_tunnel::client: Sending connection intent resource=...
Stuck forever in this loop.
|
Seems that there's a flaky test - https://github.com/firezone/firezone/actions/runs/16496872800/job/46644656743?pr=9985 I'm actually able to hit this quite reliably with the following test plan:
All packets essentially get buffered and my internet "goes down". Happy to paste a log if you want to validate this PR will fix the issue. |
Yeah I think successive resets will trigger this easily. Just needs a reset at the right time, i.e. when we have already sent the join request but not received the reply yet. |
Room join requests on the portal are only valid whilst we have a WebSocket connection. To make sure the portal processes all our requests correctly, we need to hold all other messages back while we are waiting to join the room.
If the connection flaps while we are waiting to join a room, we may have a lingering join request that never gets fulfilled and thus blocks the sending of messages forever.