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.