Add get_mut methods for locks

This commit is contained in:
Ruihan Li
2024-12-12 17:31:45 +08:00
committed by Tate, Hongliang Tian
parent 87e953eac3
commit 53b873f647
7 changed files with 49 additions and 20 deletions

View File

@ -696,7 +696,7 @@ impl Socket for StreamSocket {
impl Drop for StreamSocket {
fn drop(&mut self) {
let state = self.state.write().take();
let state = self.state.get_mut().take();
let iface_to_poll = match state {
State::Init(_) => None,