Skip to content

Commit

Permalink
duration fix (#1950)
Browse files Browse the repository at this point in the history
* duration fix
* Update release notes, explicitly send -1.

---------

Co-authored-by: Christoffer Lerno <christoffer@aegik.com>
  • Loading branch information
ygorpontelo and lerno authored Feb 12, 2025
1 parent 4961d04 commit c9ecb09
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/std/net/socket.c3
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

<*
Expand Down
1 change: 1 addition & 0 deletions releasenotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit c9ecb09

Please sign in to comment.