File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
compio-driver/src/iocp/cp Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -141,13 +141,13 @@ impl CompletionPort {
141
141
timeout : Option < Duration > ,
142
142
current_driver : Option < RawFd > ,
143
143
) -> io:: Result < impl Iterator < Item = Entry > > {
144
- Ok ( self . poll_raw ( timeout) ?. map ( move |entry| {
144
+ Ok ( self . poll_raw ( timeout) ?. filter_map ( move |entry| {
145
145
// Any thin pointer is OK because we don't use the type of opcode.
146
146
let overlapped_ptr: * mut Overlapped < ( ) > = entry. lpOverlapped . cast ( ) ;
147
147
let overlapped = unsafe { & * overlapped_ptr } ;
148
148
if let Some ( current_driver) = current_driver {
149
149
if overlapped. driver != current_driver {
150
- // Repose the entry to correct port.
150
+ // Repost the entry to correct port.
151
151
if let Err ( _e) = syscall ! (
152
152
BOOL ,
153
153
PostQueuedCompletionStatus (
@@ -166,6 +166,7 @@ impl CompletionPort {
166
166
_e
167
167
) ;
168
168
}
169
+ return None ;
169
170
}
170
171
}
171
172
let res = if matches ! (
@@ -180,7 +181,7 @@ impl CompletionPort {
180
181
_ => Err ( io:: Error :: from_raw_os_error ( error as _ ) ) ,
181
182
}
182
183
} ;
183
- Entry :: new ( overlapped. user_data , res)
184
+ Some ( Entry :: new ( overlapped. user_data , res) )
184
185
} ) )
185
186
}
186
187
}
You can’t perform that action at this time.
0 commit comments