Release the scgi task buffer on close

clear() keeps the capacity, and the task is pooled until exit.
This commit is contained in:
noctuum
2026-09-18 12:36:58 +05:00
committed by Jari Sundell
parent 378c7ee854
commit 988aca1281
+2 -1
View File
@@ -93,7 +93,8 @@ SCgiTask::close() {
// The callbacks are guaranteed to be finished/canceled at this point.
auto lock = std::lock_guard<std::mutex>(m_result_mutex);
m_buffer.clear();
// clear() would keep the capacity, and the task is pooled for the lifetime of the process.
std::vector<char>().swap(m_buffer);
}
void