mirror of
https://github.com/xtr-dev/rondevu-client.git
synced 2025-12-10 02:43:25 +00:00
Fix: Initialize lastIceTimestamp to 0 to get all candidates
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 <noreply@anthropic.com>
This commit is contained in:
@@ -57,7 +57,7 @@ export class RondevuConnection {
|
|||||||
private role?: 'offerer' | 'answerer';
|
private role?: 'offerer' | 'answerer';
|
||||||
private icePollingInterval?: ReturnType<typeof setInterval>;
|
private icePollingInterval?: ReturnType<typeof setInterval>;
|
||||||
private answerPollingInterval?: ReturnType<typeof setInterval>;
|
private answerPollingInterval?: ReturnType<typeof setInterval>;
|
||||||
private lastIceTimestamp: number = Date.now();
|
private lastIceTimestamp: number = 0; // Start at 0 to get all candidates on first poll
|
||||||
private eventListeners: Map<keyof RondevuConnectionEvents, Set<Function>> = new Map();
|
private eventListeners: Map<keyof RondevuConnectionEvents, Set<Function>> = new Map();
|
||||||
private dataChannel?: RTCDataChannel;
|
private dataChannel?: RTCDataChannel;
|
||||||
private pendingIceCandidates: RTCIceCandidateInit[] = [];
|
private pendingIceCandidates: RTCIceCandidateInit[] = [];
|
||||||
|
|||||||
Reference in New Issue
Block a user