File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -134,7 +134,7 @@ let additions =
134
134
, " now"
135
135
]
136
136
, repo = " https://github.com/mikesol/purescript-event.git"
137
- , version = " v1.4.1 "
137
+ , version = " v1.4.2 "
138
138
}
139
139
, typelevel- eval =
140
140
{ dependencies =
Original file line number Diff line number Diff line change @@ -382,7 +382,7 @@ bufferToList timeToCollect incomingEvent =
382
382
makeEvent \k -> do
383
383
currentTimeoutId <- Ref .new (Nothing :: Maybe TimeoutId )
384
384
currentEventList <- Ref .new (Nil :: List { time :: Instant , value :: a } )
385
- subscribe timed \a -> do
385
+ unsub <- subscribe timed \a -> do
386
386
Ref .modify_ (Cons a) currentEventList
387
387
inTimeout <- Ref .read currentTimeoutId
388
388
when (isNothing inTimeout) $ (flip Ref .write currentTimeoutId <<< Just )
@@ -391,6 +391,8 @@ bufferToList timeToCollect incomingEvent =
391
391
Ref .write Nil currentEventList
392
392
Ref .write Nothing currentTimeoutId
393
393
k cil
394
- pure $ Ref .read currentTimeoutId >>= flip for_ clearTimeout
394
+ pure do
395
+ Ref .read currentTimeoutId >>= flip for_ clearTimeout
396
+ unsub
395
397
where
396
398
timed = withTime incomingEvent
You can’t perform that action at this time.
0 commit comments