Skip to content

Commit 800825b

Browse files
authored
fix: consistency, used this instead of that (#1618)
1 parent f3f7be7 commit 800825b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/client.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ function MqttClient (streamBuilder, options) {
330330

331331
// Send queued packets
332332
this.on('connect', function () {
333-
const queue = this.queue
333+
const queue = that.queue
334334

335335
function deliver () {
336336
const entry = queue.shift()
@@ -372,23 +372,23 @@ function MqttClient (streamBuilder, options) {
372372

373373
this.on('close', function () {
374374
debug('close :: connected set to `false`')
375-
this.connected = false
375+
that.connected = false
376376

377377
debug('close :: clearing connackTimer')
378-
clearTimeout(this.connackTimer)
378+
clearTimeout(that.connackTimer)
379379

380380
debug('close :: clearing ping timer')
381381
if (that.pingTimer !== null) {
382382
that.pingTimer.clear()
383383
that.pingTimer = null
384384
}
385385

386-
if (this.topicAliasRecv) {
387-
this.topicAliasRecv.clear()
386+
if (that.topicAliasRecv) {
387+
that.topicAliasRecv.clear()
388388
}
389389

390390
debug('close :: calling _setupReconnect')
391-
this._setupReconnect()
391+
that._setupReconnect()
392392
})
393393
EventEmitter.call(this)
394394

0 commit comments

Comments
 (0)