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 <sbrivio@redhat.com>
This commit is contained in:
parent
e8540b3f26
commit
34dd4b28b0
1 changed files with 1 additions and 3 deletions
4
tcp.c
4
tcp.c
|
@ -2639,9 +2639,7 @@ void tcp_sock_handler_splice(struct ctx *c, union epoll_ref ref,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (events & EPOLLHUP) {
|
if (events & EPOLLRDHUP) {
|
||||||
tcp_splice_state(conn, SPLICE_FIN_BOTH);
|
|
||||||
} else if (events & EPOLLRDHUP) {
|
|
||||||
if (ref.s == conn->from) {
|
if (ref.s == conn->from) {
|
||||||
if (conn->state == SPLICE_ESTABLISHED)
|
if (conn->state == SPLICE_ESTABLISHED)
|
||||||
tcp_splice_state(conn, SPLICE_FIN_FROM);
|
tcp_splice_state(conn, SPLICE_FIN_FROM);
|
||||||
|
|
Loading…
Reference in a new issue