diff --git a/lib/client.js b/lib/client.js index 202d4b1..4532425 100644 --- a/lib/client.js +++ b/lib/client.js @@ -132,7 +132,7 @@ function connect(){ data=(this.ipcBuffer+=data); - if(data.slice(-1)!=eventParser.delimiter){ + if(data.slice(-1)!=eventParser.delimiter || data.indexOf(eventParser.delimiter) == -1){ client.log('Implementing larger buffer for this socket message. You may want to consider smaller messages'.notice); return; } diff --git a/lib/socketServer.js b/lib/socketServer.js index a3d0110..842bbf8 100644 --- a/lib/socketServer.js +++ b/lib/socketServer.js @@ -172,7 +172,7 @@ function init(path,config,log,port){ data=(this.ipcBuffer+=data); - if(data.slice(-1)!=eventParser.delimiter){ + if(data.slice(-1)!=eventParser.delimiter || data.indexOf(eventParser.delimiter) == -1){ server.log('Implementing larger buffer for this socket message. You may want to consider smaller messages'.notice); return; }