Close socket on flooding detection
This commit is contained in:
parent
04ba84f185
commit
b5da5857be
@ -159,6 +159,7 @@ var StratumClient = function(options){
|
|||||||
if (Buffer.byteLength(dataBuffer, 'utf8') > 1024){
|
if (Buffer.byteLength(dataBuffer, 'utf8') > 1024){
|
||||||
dataBuffer = '';
|
dataBuffer = '';
|
||||||
_this.emit('socketFlooded');
|
_this.emit('socketFlooded');
|
||||||
|
socket.end();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (dataBuffer.slice(-1) === '\n'){
|
if (dataBuffer.slice(-1) === '\n'){
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user