Fixed bug that made session crash randomly
This commit is contained in:
+1
-1
@@ -693,7 +693,7 @@ function session(sock) {
|
||||
returnObj.dataQueue = Buffer.concat([returnObj.dataQueue, data]);
|
||||
|
||||
// Process queue
|
||||
while (returnObj.dataQueue.length !== 0) {
|
||||
while (returnObj.dataQueue.length > 4) {
|
||||
// Get this commands length
|
||||
cmdLength = parseInt(returnObj.dataQueue.readUInt32BE(0));
|
||||
log.silly('larvitsmpp: lib/session.js: session() - sock.on(data) - Processing ' + cmdLength + ' bytes of data');
|
||||
|
||||
Reference in New Issue
Block a user