diff --git a/lib/client.js b/lib/client.js index ca6bfd35..50a49189 100644 --- a/lib/client.js +++ b/lib/client.js @@ -552,8 +552,8 @@ Client.prototype.sendToBroker = function (payloads, encoder, decoder, cb) { } if (longpolling) { - if (broker.socket.waitting) continue; - broker.socket.waitting = true; + if (broker.socket.waiting) continue; + broker.socket.waiting = true; } if (decoder.requireAcks === 0) { @@ -672,7 +672,7 @@ Client.prototype.createBroker = function (host, port, longpolling) { var lastError = this.error; this.error = null; if (lastError) { - this.waitting = false; + this.waiting = false; self.emit('reconnect'); } else { self.emit('connect'); @@ -739,7 +739,7 @@ Client.prototype.handleReceivedData = function (socket) { ? cb.call(this, result) : cb.call(this, null, result); socket.buffer = socket.buffer.slice(size); - if (socket.longpolling) socket.waitting = false; + if (socket.longpolling) socket.waiting = false; } else { return; } if (socket.buffer.length) {