mirror of
https://github.com/openlibrecommunity/olcrtc.git
synced 2026-05-26 07:08:11 +00:00
fix(client): return after liveness reconnect to avoid deadlock #72
This commit is contained in:
@@ -371,6 +371,12 @@ func (c *Client) handleReconnect(ctx context.Context, cfg Config, cancel context
|
||||
// reconnect callback which then drives a fresh handshake.
|
||||
if reason == "liveness" && c.ln != nil {
|
||||
c.ln.Reconnect("liveness")
|
||||
// Return immediately — retryHandshake over the dead link would
|
||||
// loop forever with "open control stream: timeout" while holding
|
||||
// reconnectMu, blocking the carrier callback that fires once the
|
||||
// link is actually back up. Let that callback (reason="carrier")
|
||||
// drive the handshake when the transport is ready.
|
||||
return
|
||||
}
|
||||
|
||||
c.retryHandshake(ctx, cfg, cancel, reason)
|
||||
|
||||
Reference in New Issue
Block a user