Closed aikar closed 9 years ago
This isn't only thing needed since sending multiple commands still has same issue. investigating more.
Then end of method
} else {
this.emit('error', new Error("Authentication failed"));
}
data = data.slice(12 + len - 8);
} else {
// Keep a reference to the chunk if it doesn't represent a full packet
this.outstandingData = data;
break;
}
the lib is not checking that the full response has been received before issueing the response event, resulting in response firing for a partial event and then again with the full data.
To fix, line 146 needs to be if (len >= 10 && data.length >= len + 4) {