Don't remove TIME-WAIT sockets

This commit is contained in:
Ruihan Li
2025-03-18 17:56:31 +08:00
committed by Tate, Hongliang Tian
parent 240192f735
commit 7f323ac501
3 changed files with 40 additions and 16 deletions

View File

@ -292,6 +292,11 @@ impl<E: Ext> SocketTable<E> {
.position(|tcp_connection| tcp_connection.connection_key() == key)
.unwrap();
let connection = bucket.connections.swap_remove(index);
debug_assert!(
!connection.poll_key().is_active(),
"there should be no need to poll a dead TCP connection",
);
connection.on_dead_events();
}