deal with conduit 1.3 change
I don't know if this will build with older conduit, it may need an ifdef.
This commit is contained in:
parent
8ccbafa917
commit
558a0a9328
1 changed files with 2 additions and 2 deletions
|
@ -326,10 +326,10 @@ download meterupdate url file uo = go `catchNonAsync` (const $ return False)
|
|||
-
|
||||
- Note that the responseStatus is not checked by this function.
|
||||
-}
|
||||
sinkResponseFile :: MonadResource m => MeterUpdate -> BytesProcessed -> FilePath -> IOMode -> Response (ResumableSource m B8.ByteString) -> m ()
|
||||
sinkResponseFile :: MonadResource m => MeterUpdate -> BytesProcessed -> FilePath -> IOMode -> Response (ConduitM () B8.ByteString m ()) -> m ()
|
||||
sinkResponseFile meterupdate initialp file mode resp = do
|
||||
(fr, fh) <- allocate (openBinaryFile file mode) hClose
|
||||
responseBody resp $$+- go initialp fh
|
||||
runConduit $ responseBody resp .| go initialp fh
|
||||
release fr
|
||||
where
|
||||
go sofar fh = await >>= \case
|
||||
|
|
Loading…
Reference in a new issue