Skip to content

Commit

Permalink
fixup: reduce changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ronag committed Mar 8, 2020
1 parent 54de489 commit 88ce624
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/internal/streams/destroy.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,9 @@ function isRequest(stream) {

// Normalize destroy for legacy.
function destroyer(stream, err) {
if (typeof stream.destroy === 'function') return stream.destroy(err);
if (isRequest(stream)) return stream.abort();
if (isRequest(stream.req)) return stream.req.abort();
if (typeof stream.destroy === 'function') return stream.destroy(err);
if (typeof stream.close === 'function') return stream.close();
}

Expand Down

0 comments on commit 88ce624

Please sign in to comment.