Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: consistency, used this instead of that #1618

Merged
merged 1 commit into from
Jun 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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