Added log error for socket error
This commit is contained in:
parent
5fd4097ce6
commit
98d3dcc532
@ -365,8 +365,8 @@ var pool = module.exports = function pool(options, authorizeFn){
|
|||||||
|
|
||||||
}).on('malformedMessage', function (message) {
|
}).on('malformedMessage', function (message) {
|
||||||
emitWarningLog('client', client.workerName + " has sent us a malformed message: " + message);
|
emitWarningLog('client', client.workerName + " has sent us a malformed message: " + message);
|
||||||
}).on('socketError', function() {
|
}).on('socketError', function(err) {
|
||||||
emitWarningLog('client', client.workerName + " has somehow had a socket error");
|
emitWarningLog('client', client.workerName + " has somehow had a socket error: " + JSON.stringify(err));
|
||||||
}).on('socketDisconnect', function() {
|
}).on('socketDisconnect', function() {
|
||||||
emitLog('client', "Client '" + client.workerName + "' disconnected!");
|
emitLog('client', "Client '" + client.workerName + "' disconnected!");
|
||||||
}).on('unknownStratumMethod', function(fullMessage) {
|
}).on('unknownStratumMethod', function(fullMessage) {
|
||||||
|
|||||||
@ -221,7 +221,7 @@ var StratumClient = function(options){
|
|||||||
if (err.code === 'ECONNRESET')
|
if (err.code === 'ECONNRESET')
|
||||||
_this.emit('socketDisconnect')
|
_this.emit('socketDisconnect')
|
||||||
else
|
else
|
||||||
_this.emit('socketError');
|
_this.emit('socketError', err);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user