Skip to content

Commit e9ae99c

Browse files
authored
fix: config iceStopWaitingOnServerReflexive is resetting the peerConnectionDelegate
When enabling the `iceStopWaitingOnServerReflexive` configuration and you have a custom sessionDescriptionHandler with custom peerConnectionDelegate, it gets erased. As in the code forces the delegate to be the one set when that config is enabled...
1 parent 2e1c525 commit e9ae99c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/platform/web/session-manager/session-manager.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,9 @@ export class SessionManager {
571571
throw new Error("Session description handler not instance of SessionDescriptionHandler");
572572
}
573573
sessionDescriptionHandler.peerConnectionDelegate = {
574+
...sessionDescriptionHandler.peerConnectionDelegate,
574575
onicecandidate: (event) => {
576+
sessionDescriptionHandler.peerConnectionDelegate?.onicecandidate?.(event)
575577
if (event.candidate?.type === "srflx") {
576578
this.logger.log(`[${inviter.id}] Found srflx ICE candidate, stop waiting...`);
577579
// In sip.js > 0.20.1 this cast should be removed as iceGatheringComplete will be public

0 commit comments

Comments
 (0)