Skip to content

Commit

Permalink
Fix typos in client.js
Browse files Browse the repository at this point in the history
  • Loading branch information
hyperlink committed Feb 6, 2017
1 parent 2658ace commit 29e0c4e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/client.js
Expand Up @@ -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) {
Expand Down Expand Up @@ -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');
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 29e0c4e

Please sign in to comment.