chore: update c files
Some checks failed
Build and Test / build (push) Has been cancelled
Build and Test / coverage (push) Has been cancelled

This commit is contained in:
retoor 2026-01-01 21:55:23 +01:00
parent 6c91398c1c
commit fed98080d6
2 changed files with 12 additions and 1 deletions

View File

@ -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.

View File

@ -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;
}