From 0d7b980f909a9a19b2910b8d129e170be92f03e8 Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Wed, 18 Dec 2019 11:22:11 +0200 Subject: [PATCH] Remove unnecessary client.sockets ref --- src/client.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/client.js b/src/client.js index 69a87c70..4ff2a001 100644 --- a/src/client.js +++ b/src/client.js @@ -54,7 +54,6 @@ function Client(manager, name, config = {}) { idMsg: 1, name: name, networks: [], - sockets: manager.sockets, manager: manager, messageStorage: [], highlightRegex: null, @@ -145,8 +144,8 @@ Client.prototype.createChannel = function(attr) { }; Client.prototype.emit = function(event, data) { - if (this.sockets !== null) { - this.sockets.in(this.id).emit(event, data); + if (this.manager !== null) { + this.manager.sockets.in(this.id).emit(event, data); } }; @@ -574,7 +573,7 @@ Client.prototype.names = function(data) { }; Client.prototype.quit = function(signOut) { - const sockets = this.sockets.sockets; + const sockets = this.manager.sockets.sockets; const room = sockets.adapter.rooms[this.id]; if (room && room.sockets) {