Skip to content

Commit 00d916d

Browse files
committed
Track the allocated forker
1 parent b4b7613 commit 00d916d

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
@@ -846,8 +846,8 @@ newForker ::
846846
DbChangelog l ->
847847
ReadLocked m (Forker m l blk)
848848
newForker h ldbEnv (rk, releaseVar) rr dblog =
849-
readLocked $
850-
fmap snd $
849+
readLocked $ do
850+
(rk', frk) <-
851851
allocate
852852
rr
853853
( \_ -> do
@@ -876,6 +876,7 @@ newForker h ldbEnv (rk, releaseVar) rr dblog =
876876
pure $ (mkForker h (ldbQueryBatchSize ldbEnv) forkerKey forkerEnv)
877877
)
878878
forkerClose
879+
pure $ frk { forkerClose = void $ release rk' }
879880

880881
mkForker ::
881882
( IOLike m

0 commit comments

Comments
 (0)