From eea77a30002f1f0225e76c16f38f6f8b97325fe5 Mon Sep 17 00:00:00 2001 From: Orion Kindel Date: Thu, 9 May 2024 11:02:14 -0500 Subject: [PATCH] fix: maybe a race condition --- src/Node.Stream.CSV.Parse.purs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Node.Stream.CSV.Parse.purs b/src/Node.Stream.CSV.Parse.purs index 35aab5f..a5dbb0e 100644 --- a/src/Node.Stream.CSV.Parse.purs +++ b/src/Node.Stream.CSV.Parse.purs @@ -141,7 +141,7 @@ foreach stream cb = do untilJust do delay $ wrap 10.0 ct <- liftEffect $ ST.toEffect $ STRef.read count - pure $ if ct == 0 then Just unit else Nothing + pure $ if ct <= 1 then Just unit else Nothing liftEffect $ res $ Right unit pure $ Canceler $ const $ liftEffect do