Skip to content

Commit

Permalink
fix Error: write ECONNABORTED (close DevExpress#1744) (DevExpress#1811
Browse files Browse the repository at this point in the history
)
  • Loading branch information
LavrovArtem authored and AndreyBelym committed Feb 28, 2019
1 parent 5490f5b commit 8842a1d
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 8842a1d

Please sign in to comment.