Skip to content

Commit

Permalink
[ fix ] asynchronously write to streams
Browse files Browse the repository at this point in the history
  • Loading branch information
stefan-hoeck committed Apr 30, 2024
1 parent 6a112cf commit 638700c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/System/UV/Stream.idr
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ parameters {auto l : UVLoop}
export
write : Ptr t -> (0 _ : PCast t Stream) => ByteString -> Async es ()
write str b =
use1 (fromByteString b) $ \cs =>
uv $ uv_write str cs (cast b.size) (\_,_ => pure ())
use1 (fromByteString b) $ \cs => uvAsync $ \cb =>
uv_write str cs (cast b.size) (\_,_ => cb $ Succeeded ())

export
listen :
Expand Down

0 comments on commit 638700c

Please sign in to comment.