From 9c21ea3885c5158b531fb51ba3d9d15a544bf986 Mon Sep 17 00:00:00 2001 From: Max Date: Fri, 12 Jul 2024 13:11:43 +0100 Subject: [PATCH] Zero out idle time when deallocating the socket (#6357) --- src/host/rpc_connections.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/host/rpc_connections.h b/src/host/rpc_connections.h index e25c8dc7fe41..541ea198f910 100644 --- a/src/host/rpc_connections.h +++ b/src/host/rpc_connections.h @@ -345,6 +345,8 @@ namespace asynchost // Invalidating the TCP socket will result in the handle being closed. No // more messages will be read from or written to the TCP socket. sockets[id] = nullptr; + idle_times.erase(id); + RINGBUFFER_WRITE_MESSAGE(::tcp::tcp_close, to_enclave, id); return true;