File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -319,8 +319,6 @@ impl<'e> EventLoop<'e> {
319319 c_int:: try_from ( size_of :: < SOCKET > ( ) ) . expect ( "overflow" ) ,
320320 ) == 0
321321 {
322- #[ cfg( feature = "syscall" ) ]
323- crate :: syscall:: common:: reset_errno ( ) ;
324322 cqe. socket . try_into ( ) . expect ( "result overflow" )
325323 } else {
326324 -c_longlong:: from ( windows_sys:: Win32 :: Foundation :: GetLastError ( ) )
Original file line number Diff line number Diff line change @@ -105,7 +105,9 @@ macro_rules! impl_iocp {
105105 "syscall:{} returns:{} e:{}" ,
106106 Syscall :: $syscall, syscall_result, std:: io:: Error :: last_os_error( )
107107 ) ;
108- if syscall_result < 0 {
108+ if syscall_result >= 0 {
109+ $crate:: syscall:: common:: reset_errno( ) ;
110+ } else {
109111 let errno = -syscall_result;
110112 $crate:: syscall:: common:: set_errno( errno. try_into( ) . expect( "errno overflow" ) ) ;
111113 if Syscall :: accept == Syscall :: $syscall {
You can’t perform that action at this time.
0 commit comments