Skip to content
Snippets Groups Projects
Commit afd5c32f authored by Libor Peltan's avatar Libor Peltan Committed by Daniel Salzman
Browse files

XDP-TCP: bugfix: don't timeout-close already closing connections

parent 2580a3d5
No related branches found
No related tags found
1 merge request!1300Basic implementation of TCP over XDP for Knot server
This commit is part of merge request !1300. Comments created here will be created in the context of that merge request.
......@@ -459,8 +459,10 @@ int knot_xdp_tcp_timeout(knot_tcp_table_t *tcp_table, knot_xdp_socket_t *socket,
rem_node((node_t *)conn);
add_tail(&to_remove, (node_t *)conn);
} else if (now - conn->last_active >= close_timeout) {
rl.answer = XDP_TCP_CLOSE;
printf("close %hu timeout\n", be16toh(conn->ip_rem.sin6_port));
if (conn->state != XDP_TCP_CLOSING) {
rl.answer = XDP_TCP_CLOSE;
printf("close %hu timeout\n", be16toh(conn->ip_rem.sin6_port));
}
} else {
break;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment