From 3b68108b26f3d66d7beed4bcfce01a06fd9f469f Mon Sep 17 00:00:00 2001 From: strophy <32928115+strophy@users.noreply.github.com> Date: Tue, 5 Jul 2022 15:09:58 +0200 Subject: [PATCH] fix: Callback was already called (#46) --- 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); });