Skip to content

Commit dc8c18a

Browse files
committed
add log
1 parent bb33f7c commit dc8c18a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

core/src/net/event_loop.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff 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())

core/src/syscall/windows/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff 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 {

0 commit comments

Comments
 (0)