fix: await finished before exiting

This commit is contained in:
orion 2024-05-14 14:07:20 -05:00
parent 33d42034fc
commit 657af14bb6
Signed by: orion
GPG Key ID: 6D4165AE4C928719

View File

@ -94,10 +94,10 @@ fromTransform :: forall a b m. MonadThrow Error m => MonadAff m => O.Transform a
fromTransform t =
let
cleanup removeErrorListener = do
yieldWhileReadable
liftEffect $ O.end t
liftEffect $ removeErrorListener
liftAff $ O.awaitFinished t
fromReadable t
liftEffect $ removeErrorListener
pure $ Done unit
yieldWhileReadable = do