aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoruranix <uranix@yandex-team.com>2022-12-21 13:27:43 +0300
committeruranix <uranix@yandex-team.com>2022-12-21 13:27:43 +0300
commit1199f4673636d8f4967fd393eb5903f9da6d97fb (patch)
tree61042c0efdb1de918eedf71701f3ab7fcad8068f
parent7508a09b6813bc18004bca2c9c33455b924883b7 (diff)
downloadydb-1199f4673636d8f4967fd393eb5903f9da6d97fb.tar.gz
[actors/http] Fixed inactivity event handling
Проверка `if (ev->Get() == InactiveEvent)` была вложена в проверку `if (ev->Get()->Read)`, но у `InactiveEvent` поля `Read`, `Write` всегда `false`. Вероятно это произошло после рефакторинга.
-rw-r--r--library/cpp/actors/http/http_proxy_incoming.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/library/cpp/actors/http/http_proxy_incoming.cpp b/library/cpp/actors/http/http_proxy_incoming.cpp
index 3dd06d9bfc..fa63783c2d 100644
--- a/library/cpp/actors/http/http_proxy_incoming.cpp
+++ b/library/cpp/actors/http/http_proxy_incoming.cpp
@@ -161,14 +161,14 @@ protected:
return Die(ctx);
}
}
- if (event->Get() == InactivityEvent) {
- const TDuration passed = TDuration::Seconds(std::abs(InactivityTimer.Passed()));
- if (passed >= InactivityTimeout) {
- LOG_DEBUG_S(ctx, HttpLog, "(#" << TSocketImpl::GetRawSocket() << "," << Address << ") connection closed by inactivity timeout");
- return Die(ctx); // timeout
- } else {
- ctx.Schedule(InactivityTimeout - passed, InactivityEvent = new TEvPollerReady(nullptr, false, false));
- }
+ }
+ if (event->Get() == InactivityEvent) {
+ const TDuration passed = TDuration::Seconds(std::abs(InactivityTimer.Passed()));
+ if (passed >= InactivityTimeout) {
+ LOG_DEBUG_S(ctx, HttpLog, "(#" << TSocketImpl::GetRawSocket() << "," << Address << ") connection closed by inactivity timeout");
+ return Die(ctx); // timeout
+ } else {
+ ctx.Schedule(InactivityTimeout - passed, InactivityEvent = new TEvPollerReady(nullptr, false, false));
}
}
if (event->Get()->Write) {