peer: error handling.
This commit is contained in:
parent
0b620c2e47
commit
52dd3c2cdc
@ -209,6 +209,7 @@ Peer.prototype._init = function init() {
|
||||
case 'EHOSTUNREACH':
|
||||
case 'ENETUNREACH':
|
||||
case 'ENOTFOUND':
|
||||
case 'ECONNRESET':
|
||||
self.ignore();
|
||||
break;
|
||||
}
|
||||
@ -216,7 +217,6 @@ Peer.prototype._init = function init() {
|
||||
|
||||
this.socket.once('close', function() {
|
||||
self._error('socket hangup');
|
||||
self.connected = false;
|
||||
});
|
||||
|
||||
this.socket.on('data', function(chunk) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user