Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions plugins/s3_auth/s3_auth.cc
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,18 @@ class S3Config
_conf_rld_act = TSContScheduleOnPool(_conf_rld, delay * 1000, TS_THREAD_POOL_NET);
}

/**
Clear _conf_rld_act if the event handler is handling the action
*/
void
check_current_action(void *edata)
{
// Following what's TSContScheduleOnPool does before returning TSAction
if (_conf_rld_act == ((TSAction)((uintptr_t)edata | 0x1))) {
_conf_rld_act = nullptr;
}
}

ts::shared_mutex reload_mutex;

private:
Expand Down Expand Up @@ -1049,6 +1061,7 @@ config_reloader(TSCont cont, TSEvent event, void *edata)
{
std::unique_lock lock(s3->reload_mutex);
s3->copy_changes_from(file_config);
s3->check_current_action(edata);
}

if (s3->expiration() == 0) {
Expand Down