simplify transferr protocol

This commit is contained in:
Joey Hess 2020-12-11 12:52:22 -04:00
parent 095cdc7e83
commit 0c46ee5ce0
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
4 changed files with 16 additions and 17 deletions

View file

@ -116,7 +116,10 @@ metered' st othermeter msize showoutput a = go st
a meter (combinemeter m)
| otherwise = nometer
go (MessageState { outputType = SerializedOutput h _ }) = do
liftIO $ outputSerialized h $ BeginProgressMeter msize
liftIO $ outputSerialized h BeginProgressMeter
case msize of
Just sz -> liftIO $ outputSerialized h $ UpdateProgressMeterTotalSize sz
Nothing -> noop
szv <- liftIO $ newIORef msize
meter <- liftIO $ mkMeter msize $ \_ msize' _old new -> do
case msize' of