From 88ce62458ad86f55dcc276940c5632151b60f486 Mon Sep 17 00:00:00 2001 From: Robert Nagy Date: Sun, 8 Mar 2020 15:00:46 +0100 Subject: [PATCH] fixup: reduce changes --- lib/internal/streams/destroy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/internal/streams/destroy.js b/lib/internal/streams/destroy.js index 3c6bdd01c21f88..6eb46c7f7c454e 100644 --- a/lib/internal/streams/destroy.js +++ b/lib/internal/streams/destroy.js @@ -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(); }