Skip to content

Commit b5cf883

Browse files
authored
Merge pull request #398 from joeyparrish/fix-node-v12
fix: Fix test failures in node v4-v12
2 parents 33e834f + 64dfba1 commit b5cf883

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/needle.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -542,12 +542,11 @@ Needle.prototype.send_request = function(count, method, uri, config, post_data,
542542
out.done = true;
543543

544544
// An error can still be fired after closing. In particular, on macOS.
545-
// Adding an explicit abort() call resolves this without leaving a dangling
546-
// listener. See also:
545+
// See also:
547546
// - https://github.com/tomas/needle/issues/391
548547
// - https://github.com/less/less.js/issues/3693
549548
// - https://github.com/nodejs/node/issues/27916
550-
request.abort();
549+
request.once('error', function() {});
551550

552551
if (callback)
553552
return callback(err, resp, resp ? resp.body : undefined);

0 commit comments

Comments
 (0)