Skip to content

Commit

Permalink
fix Error: write ECONNABORTED (close #1744)
Browse files Browse the repository at this point in the history
  • Loading branch information
LavrovArtem committed Oct 31, 2018
1 parent 1e76958 commit 29c9a66
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/request-pipeline/connection-reset-guard.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ const connectionResetDomain = domain.create();
connectionResetDomain.on('error', err => {
// NOTE: The nodejs throw the EPIPE error instead of the ECONNRESET error
// when the connection is broken in some cases on MacOS and Linux
if (err.code === 'ECONNRESET' || !os.win && err.code === 'EPIPE')
// https://github.com/nodejs/node/blob/8b4af64f50c5e41ce0155716f294c24ccdecad03/test/parallel/test-http-destroyed-socket-write2.js
if (err.code === 'ECONNRESET' || !os.win && err.code === 'EPIPE' || os.win && err.code === 'ECONNABORTED')
return;

connectionResetDomain.removeAllListeners('error');
Expand Down

0 comments on commit 29c9a66

Please sign in to comment.