Skip to content

Commit

Permalink
fix: Callback was already called (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
strophy authored Jul 5, 2022
1 parent 0e27723 commit 3b68108
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ if (self.timeout) {

req.on('timeout', () => {
const err = new Error(`Timeout Error: ${options.timeout}ms exceeded`);
called = true;
callback(err);
});

Expand Down

0 comments on commit 3b68108

Please sign in to comment.