diff --git a/services/libs/jinux-std/src/net/socket/ip/stream/listen.rs b/services/libs/jinux-std/src/net/socket/ip/stream/listen.rs index 20b3f114f..bc3d23800 100644 --- a/services/libs/jinux-std/src/net/socket/ip/stream/listen.rs +++ b/services/libs/jinux-std/src/net/socket/ip/stream/listen.rs @@ -105,7 +105,7 @@ impl ListenStream { } pub fn local_endpoint(&self) -> Result { - self.bound_socket() + self.bound_socket .local_endpoint() .ok_or_else(|| Error::with_message(Errno::EINVAL, "does not has remote endpoint")) } @@ -114,10 +114,6 @@ impl ListenStream { self.pollee.poll(mask, poller) } - fn bound_socket(&self) -> Arc { - self.backlog_sockets.read()[0].bound_socket.clone() - } - fn update_io_events(&self) { // The lock should be held to avoid data races let backlog_sockets = self.backlog_sockets.read();