0.5.2 return handle to newly added socket instead of just init function

master
David Kebler 2020-07-04 10:14:18 -07:00
parent 93a5c72e5f
commit eee7a8f11e
2 changed files with 7 additions and 6 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@uci/base",
"version": "0.5.1",
"version": "0.5.2",
"description": "Multi type and transport JSON packet communication base class. Used in UCI extended classes",
"main": "src/base",
"scripts": {
@ -39,18 +39,18 @@
"devDependencies": {
"chai": "^4.2.0",
"esm": "^3.2.25",
"mocha": "^7.1.1",
"nodemon": "^2.0.2"
"mocha": "^8.0.1",
"nodemon": "^2.0.4"
},
"dependencies": {
"@uci-utils/bind-funcs": "^0.2.4",
"@uci-utils/logger": "^0.0.16",
"@uci-utils/logger": "^0.0.18",
"@uci-utils/ready": "^0.3.0",
"@uci/mqtt": "^0.3.1",
"@uci/socket": "^0.3.1",
"@uci/websocket": "^0.4.0",
"await-to-js": "^2.1.1",
"is-plain-object": "^3.0.0",
"is-plain-object": "^3.0.1",
"merge-anything": "^3.0.3"
}
}

View File

@ -287,7 +287,8 @@ class Base extends EventEmitter {
this._socket[name].conPackets.unshift(this._readyPacket)
if (options.duplex) this.consumerConnected(this._socket[name],{consumer:options.duplex, add:true})
}
return this.getSocketInit(name) // returns the init function (e.g. connect or create) for the socket
return this._socket[name] // return handle to newly registered socket
// return this.getSocketInit(name) // returns the init function (e.g. connect or create) for the socket
}
}