Skip to content

Commit 4b48e17

Browse files
socket::unix::connect: notify the target wait queue
Signed-off-by: Andy-Python-Programmer <[email protected]>
1 parent 7b41d8b commit 4b48e17

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/aero_kernel/src/socket/unix.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ impl UnixSocketBacklog {
6565
}
6666

6767
pub fn len(&self) -> usize {
68-
self.backlog.as_ref().map(|e| e.len()).unwrap_or(0)
68+
self.backlog.as_ref().map(|e| e.len()).unwrap()
6969
}
7070

7171
pub fn update_capacity(&mut self, capacity: usize) {
@@ -142,15 +142,15 @@ impl INodeInterface for UnixSocket {
142142
.downcast_arc::<UnixSocket>()
143143
.ok_or(FileSystemError::NotSocket)?; // NOTE: the provided socket was not a unix socket.
144144

145-
let mut target = target.inner.write();
145+
let mut itarget = target.inner.write();
146146

147147
// ensure that the target socket is listening for new connections.
148-
if !target.listening {
148+
if !itarget.listening {
149149
return Err(FileSystemError::ConnectionRefused);
150150
}
151151

152-
target.backlog.push(self.sref());
153-
self.wq.notify_complete();
152+
itarget.backlog.push(self.sref());
153+
target.wq.notify_complete();
154154

155155
Ok(())
156156
}
@@ -165,8 +165,6 @@ impl INodeInterface for UnixSocket {
165165
}
166166

167167
fn poll(&self, table: Option<&mut PollTable>) -> Result<EPollEventFlags> {
168-
log::warn!("UnixSocket::poll() is a stub");
169-
170168
table.map(|e| e.insert(&self.wq));
171169

172170
let mut events = EPollEventFlags::default();

0 commit comments

Comments
 (0)