@iobroker/socket-classes 1.1.4 → 1.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/lib/socketCommon.js +3 -5
- package/package.json +1 -1
package/README.md
CHANGED
package/lib/socketCommon.js
CHANGED
|
@@ -271,11 +271,9 @@ class SocketCommon {
|
|
|
271
271
|
|
|
272
272
|
this._updateConnectedInfo();
|
|
273
273
|
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
if (!commands['name']) {
|
|
274
|
+
if (!this.commands.getCommandHandler('name')) {
|
|
277
275
|
// socket sends its name => update list of sockets
|
|
278
|
-
|
|
276
|
+
this.addCommandHandler('name', (_socket, name, cb) => {
|
|
279
277
|
this.adapter.log.debug(`Connection from "${name}"`);
|
|
280
278
|
if (_socket._name === undefined) {
|
|
281
279
|
_socket._name = name;
|
|
@@ -287,7 +285,7 @@ class SocketCommon {
|
|
|
287
285
|
}
|
|
288
286
|
|
|
289
287
|
typeof cb === 'function' && cb();
|
|
290
|
-
};
|
|
288
|
+
});
|
|
291
289
|
}
|
|
292
290
|
|
|
293
291
|
this.commands.applyCommands(socket);
|