Skip to content

Commit

Permalink
fix: consistency, used this instead of that (#1618)
Browse files Browse the repository at this point in the history
  • Loading branch information
robertsLando committed Jun 28, 2023
1 parent f3f7be7 commit 800825b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ function MqttClient (streamBuilder, options) {

// Send queued packets
this.on('connect', function () {
const queue = this.queue
const queue = that.queue

function deliver () {
const entry = queue.shift()
Expand Down Expand Up @@ -372,23 +372,23 @@ function MqttClient (streamBuilder, options) {

this.on('close', function () {
debug('close :: connected set to `false`')
this.connected = false
that.connected = false

debug('close :: clearing connackTimer')
clearTimeout(this.connackTimer)
clearTimeout(that.connackTimer)

debug('close :: clearing ping timer')
if (that.pingTimer !== null) {
that.pingTimer.clear()
that.pingTimer = null
}

if (this.topicAliasRecv) {
this.topicAliasRecv.clear()
if (that.topicAliasRecv) {
that.topicAliasRecv.clear()
}

debug('close :: calling _setupReconnect')
this._setupReconnect()
that._setupReconnect()
})
EventEmitter.call(this)

Expand Down

0 comments on commit 800825b

Please sign in to comment.