Skip to content

Commit

Permalink
Fix: wasi compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
ysbaddaden committed Jan 27, 2025
1 parent ea32e8b commit e25f992
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/crystal/event_loop/wasi.cr
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@ class Crystal::EventLoop::Wasi < Crystal::EventLoop
end

if Errno.value == Errno::EAGAIN
target.wait_readable
target.evented_wait_readable do
raise IO::TimeoutError.new("Read timed out")
end
else
raise IO::Error.from_errno(errno_msg, target: target)
end
Expand All @@ -136,7 +138,9 @@ class Crystal::EventLoop::Wasi < Crystal::EventLoop
end

if Errno.value == Errno::EAGAIN
target.wait_writable
target.evented_wait_writable do
raise IO::TimeoutError.new("Write timed out")
end
else
raise IO::Error.from_errno(errno_msg, target: target)
end
Expand Down

0 comments on commit e25f992

Please sign in to comment.