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 when the log
// threads are spawned, which happens well after Log::init() during startup and not at all in command mode, 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