diff --git a/hbs2-peer/app/PeerTypes.hs b/hbs2-peer/app/PeerTypes.hs index ae244b2b..07c64e78 100644 --- a/hbs2-peer/app/PeerTypes.hs +++ b/hbs2-peer/app/PeerTypes.hs @@ -289,7 +289,10 @@ addDownload h = do wip <- asks (view blockWip) liftIO do - atomically $ writeTQueue q h + atomically $ do + modifyTVar tinq $ HashMap.insert h () + writeTQueue q h + Cache.insert wip h () -- | False -> do -- not hasSize -> do