From 2989326a5079f03b2e01a401335ad0706ecb098f Mon Sep 17 00:00:00 2001 From: Bas van den Aakster Date: Fri, 14 Nov 2025 20:46:47 +0100 Subject: [PATCH] Fix: Initialize lastIceTimestamp to 0 to get all candidates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Critical bug fix: lastIceTimestamp was initialized to Date.now(), causing the first poll to miss early ICE candidates that were sent before polling started. This resulted in ICE failure. Now initializes to 0 so the first poll retrieves ALL candidates. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- src/connection.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/connection.ts b/src/connection.ts index 43670d8..d23d4eb 100644 --- a/src/connection.ts +++ b/src/connection.ts @@ -57,7 +57,7 @@ export class RondevuConnection { private role?: 'offerer' | 'answerer'; private icePollingInterval?: ReturnType; private answerPollingInterval?: ReturnType; - private lastIceTimestamp: number = Date.now(); + private lastIceTimestamp: number = 0; // Start at 0 to get all candidates on first poll private eventListeners: Map> = new Map(); private dataChannel?: RTCDataChannel; private pendingIceCandidates: RTCIceCandidateInit[] = [];