zwoop commented on code in PR #10559:
URL: https://github.com/apache/trafficserver/pull/10559#discussion_r1361328932
##########
plugins/experimental/rate_limit/sni_selector.cc:
##########
@@ -139,6 +262,26 @@ SniSelector::setupQueueCont()
_queue_cont = TSContCreate(sni_queue_cont, TSMutexCreate());
TSReleaseAssert(_queue_cont);
TSContDataSet(_queue_cont, this);
- _action = TSContScheduleEveryOnPool(_queue_cont, QUEUE_DELAY_TIME.count(),
TS_THREAD_POOL_TASK);
+ _queue_action = TSContScheduleEveryOnPool(_queue_cont,
QUEUE_DELAY_TIME.count(), TS_THREAD_POOL_TASK);
}
}
+
+///////////////////////////////////////////////////////////////////////////////
+// Startup of the SNI selector hooks and config reload continuation and
instance
+//
+void
+SniSelector::startup()
+{
+ TSCont sni_cont = TSContCreate(sni_limit_cont, nullptr);
+
+ TSReleaseAssert(sni_cont);
+
+ _instance.store(new SniSelector());
+ TSHttpHookAdd(TS_SSL_CLIENT_HELLO_HOOK, sni_cont);
+ TSHttpHookAdd(TS_VCONN_CLOSE_HOOK, sni_cont);
+
+ auto config_cont = TSContCreate(sni_config_cont, TSMutexCreate());
+
+ TSReleaseAssert(config_cont);
+ TSContScheduleEveryOnPool(config_cont,
std::chrono::milliseconds{10000}.count(), TS_THREAD_POOL_TASK);
Review Comment:
Yeh, for convenience, but we can change to be triggered with traffic_ctl.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]