Skip to content

Commit 8cf8d24

Browse files
author
Rachel Nehmer
committed
Use the err.code property to check for ECONNRESET error
1 parent 3c300a8 commit 8cf8d24

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/connection.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ class Connection extends EventEmitter {
174174
this.connectTimeout = null;
175175
}
176176
// Do not throw an error when a connection ends with a RST,ACK packet
177-
if (err.errno === 'ECONNRESET' && this._closing) {
177+
if (err.code === 'ECONNRESET' && this._closing) {
178178
return;
179179
}
180180
this._handleFatalError(err);

0 commit comments

Comments
 (0)