vrpc 3.5.1 → 3.5.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vrpc",
3
- "version": "3.5.1",
3
+ "version": "3.5.2",
4
4
  "description": "Variadic Remote Procedure Calls",
5
5
  "main": "index.js",
6
6
  "directories": {
@@ -188,6 +188,11 @@ class VrpcClient extends EventEmitter {
188
188
  }
189
189
  if (username === undefined) delete options.username
190
190
  if (password === undefined) delete options.password
191
+
192
+ this.on('error', err => {
193
+ this._log.debug(`Encountered MQTT error: ${err.message}`)
194
+ })
195
+
191
196
  this._client = mqtt.connect(this._broker, options)
192
197
 
193
198
  // Persistent lifecycle handlers
@@ -211,10 +216,6 @@ class VrpcClient extends EventEmitter {
211
216
  this.emit('error', err)
212
217
  })
213
218
 
214
- this.on('error', err => {
215
- this._log.debug(`Encountered MQTT error: ${err.message}`)
216
- })
217
-
218
219
  this._client.on('connect', () => {
219
220
  // This will give us an overview of all remotely available classes
220
221
  const agent = this._agent === '*' ? '+' : this._agent