From 2868f526f207504c2ebadf05c9cbb94b7cfa15db Mon Sep 17 00:00:00 2001 From: Joey Parrish Date: Mon, 21 Mar 2022 18:11:03 -0700 Subject: [PATCH] fix: Fix test failures in node v14-v16 This fixes a failing socket cleanup test by destroying the request on error. This test did not fail on node v17. Closes #395 --- test/socket_cleanup_spec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/socket_cleanup_spec.js b/test/socket_cleanup_spec.js index 483b4620e..fdfc0cb73 100644 --- a/test/socket_cleanup_spec.js +++ b/test/socket_cleanup_spec.js @@ -61,7 +61,7 @@ describe('socket cleanup', function(){ stream.pipeline(resp, writable, function(err) { err.code.should.eql('ERR_STREAM_PREMATURE_CLOSE') - // if (err) resp.request.destroy(); + if (err) resp.request.destroy(); }); setTimeout(function() { @@ -76,4 +76,4 @@ describe('socket cleanup', function(){ }) -}) \ No newline at end of file +})