Ignore an EPIPE thrown after a transmission error.
This is a harmless error and nothing seems to suppress it, so we'll ignore it in the right circumstances.
This commit is contained in:
Родитель
2a08286fe2
Коммит
cdeb522064
|
@ -290,6 +290,12 @@ Connection.prototype.initialisingConnection = function() {
|
|||
*/
|
||||
Connection.prototype.errorOccurred = function(socket, err) {
|
||||
debug("Socket error occurred", socket.socketId, err);
|
||||
|
||||
if(socket.transmissionErrorOccurred && err.code == 'EPIPE') {
|
||||
debug("EPIPE occurred after a transmission error which we can ignore");
|
||||
return;
|
||||
}
|
||||
|
||||
this.emit('socketError', err);
|
||||
if(this.socket == socket && this.deferredConnection && this.deferredConnection.promise.isPending()) {
|
||||
this.deferredConnection.reject(err);
|
||||
|
@ -452,6 +458,8 @@ Connection.prototype.handleTransmissionError = function (socket, data) {
|
|||
this.bufferNotification(notification);
|
||||
}
|
||||
}
|
||||
|
||||
socket.transmissionErrorOccurred = true;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче