From c9ecb09cd79da39df5d40004770fab4bf65f6611 Mon Sep 17 00:00:00 2001 From: Ygor Pontelo <32963605+ygorpontelo@users.noreply.github.com> Date: Wed, 12 Feb 2025 18:13:07 -0300 Subject: [PATCH] duration fix (#1950) * duration fix * Update release notes, explicitly send -1. --------- Co-authored-by: Christoffer Lerno --- lib/std/net/socket.c3 | 2 +- releasenotes.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/std/net/socket.c3 b/lib/std/net/socket.c3 index 1eef49722..b895726dc 100644 --- a/lib/std/net/socket.c3 +++ b/lib/std/net/socket.c3 @@ -58,7 +58,7 @@ struct Poll *> fn ulong! poll(Poll[] polls, Duration timeout) { - return poll_ms(polls, timeout.to_ms()) @inline; + return poll_ms(polls, timeout == POLL_FOREVER ? -1 : timeout.to_ms()) @inline; } <* diff --git a/releasenotes.md b/releasenotes.md index a1e070a55..9f9977946 100644 --- a/releasenotes.md +++ b/releasenotes.md @@ -66,6 +66,7 @@ - Circumvent Aarch64 miscompilations of atomics. - Fixes to ByteBuffer allocation/free. - Fix issue where compiling both for asm and object file would corrupt the obj file output. +- Fix `poll` and `POLL_FOREVER`. ### Stdlib changes - Added '%h' and '%H' for printing out binary data in hexadecimal using the formatter.