From fed98080d6eba46e81d5553832034bc9a2a18d0c Mon Sep 17 00:00:00 2001 From: retoor Date: Thu, 1 Jan 2026 21:55:23 +0100 Subject: [PATCH] chore: update c files --- CHANGELOG.md | 8 ++++++++ src/connection.c | 5 ++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 99c1f80..e7e5c88 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,14 @@ + +## Version 0.9.0 - 2026-01-01 + +update c files + +**Changes:** 1 files, 5 lines +**Languages:** C (5 lines) + ## Version 0.8.0 - 2025-12-29 Enables keep-alive connections for internal routes, allowing multiple requests over the same connection. Adds a test to verify handling of the second request on an internal route. diff --git a/src/connection.c b/src/connection.c index d495201..6fde003 100755 --- a/src/connection.c +++ b/src/connection.c @@ -973,7 +973,6 @@ static void handle_forwarding(connection_t *conn) { if (bytes_read == 0) { log_debug("EOF on fd %d, performing half-close on pair fd %d", conn->fd, pair->fd); conn->half_closed = 1; - connection_modify_epoll(conn->fd, buffer_available_read(&conn->write_buf) ? EPOLLOUT : 0); if (pair->fd != -1 && !pair->write_shutdown) { if (shutdown(pair->fd, SHUT_WR) == -1 && errno != ENOTCONN) { @@ -984,6 +983,10 @@ static void handle_forwarding(connection_t *conn) { if (pair->half_closed) { connection_close(conn->fd); + } else if (buffer_available_read(&conn->write_buf) > 0) { + connection_modify_epoll(conn->fd, EPOLLOUT); + } else { + connection_modify_epoll(conn->fd, EPOLLIN); } return; }