Skip to content

[Minor] logging fixes#899

Open
siddimore wants to merge 1 commit intolivekit:mainfrom
siddimore:reconnect-logging-fixes
Open

[Minor] logging fixes#899
siddimore wants to merge 1 commit intolivekit:mainfrom
siddimore:reconnect-logging-fixes

Conversation

@siddimore
Copy link
Copy Markdown

@siddimore siddimore commented Apr 29, 2026

Why

Several silent failure paths made it a bit harder to debug and understand the reason while debugging

Changes

  • engine.go — reconnect backoff: Replaced the dead break (delay > maxReconnectInterval) with a min() clamp. With quadratic growth and maxReconnectCount=10, the break was unreachable (max delay is 24.3s vs 60s cap). If maxReconnectCount were ever increased, the break would exit the loop early and skip the OnDisconnected call, leaving the room in a zombie state.
  • engine.go — data packet parse error: Was silently returning on error. Now logs Warnw with the error
  • engine.go — unknown DataChannel label: Was silently returning. Now logs Warnw with the label
  • room.go — reconnect state transitions: OnRestarting, OnResuming, and OnResumed now log Infow at the room level, making the reconnect lifecycle traceable without relying solely on engine-level logs.
  • remoteparticipant.go — track subscription timeout: The 5s metadata wait goroutine now logs Warnw with trackSID
  • localparticipant.go — wrong logger instance: updateSubscriptionPermissionLocked was using the global logger instead of p.log

Testing

go build . passes cleanly

@siddimore siddimore force-pushed the reconnect-logging-fixes branch from 1ea8fec to 60262a8 Compare April 29, 2026 20:59
@siddimore siddimore marked this pull request as ready for review April 29, 2026 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant