Skip to content

Commit

Permalink
fix: Fix test failures in node v14-v16
Browse files Browse the repository at this point in the history
This fixes a failing socket cleanup test by destroying the request on
error.  This test did not fail on node v17.

Closes #395
  • Loading branch information
joeyparrish committed Mar 22, 2022
1 parent 67ad8a4 commit 2868f52
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/socket_cleanup_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -76,4 +76,4 @@ describe('socket cleanup', function(){

})

})
})

0 comments on commit 2868f52

Please sign in to comment.