Close socket on flooding detection

This commit is contained in:
Matt 2014-02-20 16:32:13 -07:00
parent 04ba84f185
commit b5da5857be

View File

@ -159,6 +159,7 @@ var StratumClient = function(options){
if (Buffer.byteLength(dataBuffer, 'utf8') > 1024){
dataBuffer = '';
_this.emit('socketFlooded');
socket.end();
return;
}
if (dataBuffer.slice(-1) === '\n'){