From 6d335ba691e7c776e607d44df4671ad219e23c34 Mon Sep 17 00:00:00 2001 From: yjmp14 Date: Thu, 17 Nov 2022 13:46:29 +0800 Subject: [PATCH] Implement PRs from https://github.com/RobinLinus/snapdrop fix WSPeer https://github.com/RobinLinus/snapdrop/pull/458 fix this._isCaller variable typo https://github.com/RobinLinus/snapdrop/pull/531 --- client/scripts/network.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/scripts/network.js b/client/scripts/network.js index e1383f3d..24e29dfa 100644 --- a/client/scripts/network.js +++ b/client/scripts/network.js @@ -302,7 +302,7 @@ class RTCPeer extends Peer { _onChannelClosed() { console.log('RTC: channel closed', this._peerId); - if (!this.isCaller) return; + if (!this._isCaller) return; this._connect(this._peerId, true); // reopen the channel } @@ -413,7 +413,7 @@ class PeersManager { } -class WSPeer { +class WSPeer extends Peer { _send(message) { message.to = this._peerId; this._server.send(message);