Skip to content

Commit 4711272

Browse files
committed
refactor(vsock): don't lock NullSocket
1 parent 0c8198c commit 4711272

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/fd/socket/vsock.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ impl NullSocket {
5151
}
5252

5353
#[async_trait]
54-
impl ObjectInterface for async_lock::RwLock<NullSocket> {}
54+
impl ObjectInterface for NullSocket {}
5555

5656
#[derive(Debug)]
5757
pub struct Socket {
@@ -444,7 +444,7 @@ impl ObjectInterface for async_lock::RwLock<Socket> {
444444

445445
async fn accept(&self) -> io::Result<(Arc<dyn ObjectInterface>, Endpoint)> {
446446
let (handle, endpoint) = self.write().await.accept().await?;
447-
Ok((Arc::new(async_lock::RwLock::new(handle)), endpoint))
447+
Ok((Arc::new(handle), endpoint))
448448
}
449449

450450
async fn getpeername(&self) -> io::Result<Option<Endpoint>> {

0 commit comments

Comments
 (0)