chore: update c files
This commit is contained in:
parent
6c91398c1c
commit
fed98080d6
@ -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
|
## 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.
|
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.
|
||||||
|
|||||||
@ -973,7 +973,6 @@ static void handle_forwarding(connection_t *conn) {
|
|||||||
if (bytes_read == 0) {
|
if (bytes_read == 0) {
|
||||||
log_debug("EOF on fd %d, performing half-close on pair fd %d", conn->fd, pair->fd);
|
log_debug("EOF on fd %d, performing half-close on pair fd %d", conn->fd, pair->fd);
|
||||||
conn->half_closed = 1;
|
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 (pair->fd != -1 && !pair->write_shutdown) {
|
||||||
if (shutdown(pair->fd, SHUT_WR) == -1 && errno != ENOTCONN) {
|
if (shutdown(pair->fd, SHUT_WR) == -1 && errno != ENOTCONN) {
|
||||||
@ -984,6 +983,10 @@ static void handle_forwarding(connection_t *conn) {
|
|||||||
|
|
||||||
if (pair->half_closed) {
|
if (pair->half_closed) {
|
||||||
connection_close(conn->fd);
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user