Skip to content

Commit

Permalink
remove socket from network interface, if the socket is dropped
Browse files Browse the repository at this point in the history
  • Loading branch information
stlankes committed Sep 23, 2024
1 parent 84c4389 commit 991c340
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/fd/socket/udp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ impl Socket {
impl Drop for Socket {
fn drop(&mut self) {
let _ = block_on(self.close(), None);
NIC.lock().as_nic_mut().unwrap().destroy_socket(self.handle);
}
}

Expand Down

0 comments on commit 991c340

Please sign in to comment.