Skip to content

Commit

Permalink
[#508] Fix socket timeouts in windows platform
Browse files Browse the repository at this point in the history
  • Loading branch information
elfenpiff committed Jan 21, 2025
1 parent bfea951 commit 556c618
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 0 additions & 1 deletion iceoryx2-cal/tests/event_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ mod event {
use std::time::Instant;

use iceoryx2_bb_container::semantic_string::*;
use iceoryx2_bb_log::{set_log_level, LogLevel};
use iceoryx2_bb_posix::barrier::*;
use iceoryx2_bb_system_types::file_name::FileName;
use iceoryx2_bb_testing::watchdog::Watchdog;
Expand Down
8 changes: 7 additions & 1 deletion iceoryx2-pal/posix/src/windows/fcntl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,13 @@ pub unsafe fn fcntl_int(fd: int, cmd: int, arg: int) -> int {
}

let socket_fd = match HandleTranslator::get_instance().get(fd) {
Some(FdHandleEntry::Socket(socket)) => socket.fd,
Some(FdHandleEntry::Socket(mut socket)) => {
if cmd == F_SETFL && (arg & O_NONBLOCK != 0) {
socket.recv_timeout = None;
HandleTranslator::get_instance().update(FdHandleEntry::Socket(socket));
}
socket.fd
}
Some(FdHandleEntry::UdsDatagramSocket(mut socket)) => {
if cmd == F_SETFL && (arg & O_NONBLOCK != 0) {
socket.recv_timeout = None;
Expand Down

0 comments on commit 556c618

Please sign in to comment.