From 7430f7134683c99fa0d1f8368a797f7c8d06e4bf Mon Sep 17 00:00:00 2001 From: strophy Date: Tue, 5 Jul 2022 19:41:41 +0700 Subject: [PATCH] fix: Callback was already called --- lib/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/index.js b/lib/index.js index 504310c..192a316 100644 --- a/lib/index.js +++ b/lib/index.js @@ -149,6 +149,7 @@ if (self.timeout) { req.on('timeout', () => { const err = new Error(`Timeout Error: ${options.timeout}ms exceeded`); + called = true; callback(err); });