commit b67afca8ac5a60b6efe6edc153c4e6ff020b4fab
parent 23e7c0439382a3bb00cd817767cf6a1a82893d4a
Author: RobinLinus <robinlinus@users.noreply.github.com>
Date: Fri, 21 Sep 2018 19:54:16 +0200
Cancel keep alive on join room
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/server/index.js b/server/index.js
@@ -53,6 +53,7 @@ class SnapdropServer {
}
_joinRoom(peer) {
+ this._cancelKeepAlive(peer);
// if room doesn't exist, create it
if (!this._rooms[peer.ip]) {
this._rooms[peer.ip] = {};
@@ -84,8 +85,8 @@ class SnapdropServer {
}
_leaveRoom(peer) {
- // delete the peer
this._cancelKeepAlive(peer);
+ // delete the peer
if (!this._rooms[peer.ip] || !this._rooms[peer.ip][peer.id]) return;
delete this._rooms[peer.ip][peer.id];