Fixed up error handling for stratum socket
This commit is contained in:
parent
e02b265d13
commit
8e3b28cea3
@ -154,8 +154,8 @@ var pool = module.exports = function pool(options, authorizeFn){
|
||||
if (error)
|
||||
emitErrorLog('system', 'Error with initial getblocktemplate');
|
||||
else{
|
||||
StartStratumServer();
|
||||
SetupBlockPolling();
|
||||
StartStratumServer();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@ -178,8 +178,11 @@ var StratumClient = function(options){
|
||||
socket.on('end', function() {
|
||||
_this.emit('socketDisconnect')
|
||||
});
|
||||
socket.on('error', function(){
|
||||
_this.emit('socketError');
|
||||
socket.on('error', function(err){
|
||||
if (err.code === 'ECONNRESET')
|
||||
_this.emit('socketDisconnect')
|
||||
else
|
||||
_this.emit('socketError');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
0
lib/vardiff.js
Normal file
0
lib/vardiff.js
Normal file
Loading…
Reference in New Issue
Block a user