Skip to content

Commit 46318f1

Browse files
committed
Trying to prevent candidates before offer
1 parent 0ef0a72 commit 46318f1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/webrtc_session.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,6 @@ export class PeerbookSession extends WebRTCSession {
441441
this.onStateChange("failed", Failure.InternalError)
442442
return
443443
}
444-
this.pc.setLocalDescription(d)
445444
try {
446445
await terminal7.pb.adminCommand({type: "offer",
447446
args: {
@@ -451,7 +450,9 @@ export class PeerbookSession extends WebRTCSession {
451450
} catch(e) {
452451
terminal7.log("failed to send offer", e)
453452
this.onStateChange("failed", e)
453+
return
454454
}
455+
this.pc.setLocalDescription(d)
455456
}
456457
peerAnswer(offer) {
457458
const sd = new RTCSessionDescription(offer)

0 commit comments

Comments
 (0)