Windows is still sometimes failing with ECONNRESET. Bring back the
handling of this error as was initially introduced in PR #4442.
PR-URL: https://github.com/nodejs/node/pull/5179
Reviewed-By: Rich Trott <rtrott@gmail.com>
Fixes: https://github.com/nodejs/node/issues/3635
}
var server = net.createServer(function(s) {
+ if (common.isWindows) {
+ s.on('error', function(err) {
+ // Prevent possible ECONNRESET errors from popping up
+ if (err.code !== 'ECONNRESET')
+ throw err;
+ });
+ }
setTimeout(function() {
s.destroy();
}, 100);