Cleanup; fix STUN servers

This commit is contained in:
RobinLinus 2018-09-21 19:14:25 +02:00
parent e9eeea48e5
commit 6317c25b10
3 changed files with 19 additions and 17 deletions

View file

@ -84,7 +84,7 @@ class SnapdropServer {
_leaveRoom(peer) {
// delete the peer
this._cancelKeepAlive(peer);
if (!this._rooms[peer.ip]) return;
if (!this._rooms[peer.ip] || !this._rooms[peer.ip][peer.id]) return;
delete this._rooms[peer.ip][peer.id];