diff --git a/src/rpc/scgi_task.cc b/src/rpc/scgi_task.cc index ed7a5e2d..f6dc8afa 100644 --- a/src/rpc/scgi_task.cc +++ b/src/rpc/scgi_task.cc @@ -93,7 +93,8 @@ SCgiTask::close() { // The callbacks are guaranteed to be finished/canceled at this point. auto lock = std::lock_guard(m_result_mutex); - m_buffer.clear(); + // clear() would keep the capacity, and the task is pooled for the lifetime of the process. + std::vector().swap(m_buffer); } void