snapdrop

A Progressive Web App for local file sharing
git clone http://git.hanabi.in/repos/snapdrop.git
Log | Files | Refs | README | LICENSE

commit e71564a97cc083b606f144db4de3e35e5e172bfb
parent 0731a21d685c35e45985a39e3df32549730953db
Author: RobinLinus <robinlinus@users.noreply.github.com>
Date:   Fri, 21 Sep 2018 20:15:55 +0200

Cancel keep alive on join room

Diffstat:
Mserver/index.js | 5++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/server/index.js b/server/index.js @@ -87,10 +87,10 @@ class SnapdropServer { } _leaveRoom(peer) { - this._cancelKeepAlive(peer); - // delete the peer if (!this._rooms[peer.ip] || !this._rooms[peer.ip][peer.id]) return; + this._cancelKeepAlive(peer); + // delete the peer delete this._rooms[peer.ip][peer.id]; peer.socket.terminate(); @@ -137,7 +137,6 @@ class SnapdropServer { _cancelKeepAlive(peer) { if (peer.timerId) { clearTimeout(peer.timerId); - peer.lastBeat = null; } } }