From 28932572bfe285937fa4c0eaabf25b216f3fbe8d Mon Sep 17 00:00:00 2001 From: Alex Hultman Date: Wed, 15 Dec 2021 06:12:09 +0100 Subject: [PATCH] Disable http timeouts during throttling --- src/HttpResponse.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/HttpResponse.h b/src/HttpResponse.h index 3af8903..5270e30 100644 --- a/src/HttpResponse.h +++ b/src/HttpResponse.h @@ -330,13 +330,16 @@ public: using Super::getRemoteAddressAsText; using Super::getNativeHandle; + /* Throttle reads and writes */ HttpResponse *pause() { Super::uv_pause(); + Super::timeout(0); return this; } HttpResponse *resume() { Super::uv_resume(); + Super::timeout(HTTP_TIMEOUT_S); return this; }