mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2026-04-05 17:33:49 +00:00
Cancel keep alive on join room
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user