mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-25 18:33:24 +00:00
Don't remove TIME-WAIT sockets
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
240192f735
commit
7f323ac501
@ -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();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user