Added log error for socket error

This commit is contained in:
Matt 2014-03-15 17:50:10 -06:00
parent 5fd4097ce6
commit 98d3dcc532
2 changed files with 3 additions and 3 deletions

View File

@ -365,8 +365,8 @@ var pool = module.exports = function pool(options, authorizeFn){
}).on('malformedMessage', function (message) {
emitWarningLog('client', client.workerName + " has sent us a malformed message: " + message);
}).on('socketError', function() {
emitWarningLog('client', client.workerName + " has somehow had a socket error");
}).on('socketError', function(err) {
emitWarningLog('client', client.workerName + " has somehow had a socket error: " + JSON.stringify(err));
}).on('socketDisconnect', function() {
emitLog('client', "Client '" + client.workerName + "' disconnected!");
}).on('unknownStratumMethod', function(fullMessage) {

View File

@ -221,7 +221,7 @@ var StratumClient = function(options){
if (err.code === 'ECONNRESET')
_this.emit('socketDisconnect')
else
_this.emit('socketError');
_this.emit('socketError', err);
});
}