Skip to content
Draft
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
10 changes: 7 additions & 3 deletions src/traffic_server/traffic_server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -309,9 +309,13 @@ struct AutoStopCont : public Continuation {
CacheShm::mark_clean_shutdown();
}

// Wake preproc threads to drain remaining log buffers before exit.
for (int i = 0; i < Log::preproc_threads; i++) {
Log::preproc_notify[i].signal();
// Wake preproc threads to drain remaining log buffers before exit. The notify array is allocated only once the log
// threads are spawned, which has not happened yet this early in startup and never happens at all for the log-only
// tools, so a null array means there is no preproc thread in existence and nothing to wake.
if (Log::preproc_notify != nullptr) {
for (int i = 0; i < Log::preproc_threads; i++) {
Log::preproc_notify[i].signal();
}
}
delete this;
return EVENT_CONT;
Expand Down