From fa220c8ba134de1037340f1f7ec99a5e5a016f2f Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Tue, 28 May 2024 09:30:20 +0200 Subject: [PATCH] step-05: become Initiaor after remoteHangup Reloading a window prevents a reconnect, forcing one to restart both ends. This commit sets `isInitiator` to true and thereby allowing other peers to reconnect after a reload. Signed-off-by: Paul Spooren --- step-05/js/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/step-05/js/main.js b/step-05/js/main.js index 8c60d51..63fba8c 100644 --- a/step-05/js/main.js +++ b/step-05/js/main.js @@ -247,7 +247,7 @@ function hangup() { function handleRemoteHangup() { console.log('Session terminated.'); stop(); - isInitiator = false; + isInitiator = true; } function stop() {