Skip to content

Commit

Permalink
test: fix timeout not being cleared
Browse files Browse the repository at this point in the history
  • Loading branch information
Isaac-yz-Liu committed Aug 6, 2024
1 parent 277ed9f commit 6364faa
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions test/parallel/test-pipe-file-to-http.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,10 @@ const filename = tmpdir.resolve('big');
let count = 0;

const server = http.createServer((req, res) => {
let timeoutId;
assert.strictEqual(req.method, 'POST');
req.pause();

setTimeout(() => {
const timeoutId = setTimeout(() => {
req.resume();
}, 1000);

Expand Down

0 comments on commit 6364faa

Please sign in to comment.