From 34dd4b28b008bb8c6ec7c7b745b00c631563e9a4 Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Thu, 16 Sep 2021 08:27:06 +0200 Subject: pasta, tcp: Don't set SPLICE_FIN_BOTH state on EPOLLHUP EPOLLHUP just means we shut down one side of the connection on *one* socket: remember, we have two sockets here. Signed-off-by: Stefano Brivio --- tcp.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'tcp.c') diff --git a/tcp.c b/tcp.c index d5a45e4..6e4b99b 100644 --- a/tcp.c +++ b/tcp.c @@ -2639,9 +2639,7 @@ void tcp_sock_handler_splice(struct ctx *c, union epoll_ref ref, } } - if (events & EPOLLHUP) { - tcp_splice_state(conn, SPLICE_FIN_BOTH); - } else if (events & EPOLLRDHUP) { + if (events & EPOLLRDHUP) { if (ref.s == conn->from) { if (conn->state == SPLICE_ESTABLISHED) tcp_splice_state(conn, SPLICE_FIN_FROM); -- cgit v1.2.3