Remove has_pending_responses_

This commit is contained in:
2025-09-15 11:10:47 -04:00
parent 1b220d0d1c
commit 1cb7a4c301
3 changed files with 3 additions and 8 deletions

View File

@@ -132,10 +132,8 @@ void Connection::send_response(void *protocol_context,
pending_response_queue_.emplace_back(
PendingResponse{protocol_context, response_json, std::move(arena)});
// Mark that we have pending responses and trigger epoll interest
if (!has_pending_responses_) {
has_pending_responses_ = true;
// Trigger epoll interest if this is the first pending response
if (pending_response_queue_.size() == 1) {
auto server = server_.lock();
if (fd_ >= 0 && server) {
// Add EPOLLOUT interest to trigger on_preprocess_writes