Skip to content

Commit 513d27d

Browse files
committed
Track the allocated forker
1 parent 8a0e2b2 commit 513d27d

File tree

1 file changed

+3
-2
lines changed
  • ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Storage/LedgerDB

1 file changed

+3
-2
lines changed

ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Storage/LedgerDB/V1.hs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -844,8 +844,8 @@ newForker ::
844844
DbChangelog l ->
845845
ReadLocked m (Forker m l blk)
846846
newForker h ldbEnv (rk, releaseVar) rr dblog =
847-
readLocked $
848-
fmap snd $
847+
readLocked $ do
848+
(rk', frk) <-
849849
allocate
850850
rr
851851
( \_ -> do
@@ -874,6 +874,7 @@ newForker h ldbEnv (rk, releaseVar) rr dblog =
874874
pure $ (mkForker h (ldbQueryBatchSize ldbEnv) forkerKey forkerEnv)
875875
)
876876
forkerClose
877+
pure $ frk { forkerClose = void $ release rk' }
877878

878879
mkForker ::
879880
( IOLike m

0 commit comments

Comments
 (0)