fix: web: don't hang when saving a large file [#2319]
This commit is contained in:
parent
151b36a6f2
commit
8f6a7c8a66
@ -452,8 +452,8 @@ inputToHandle t = do
|
||||
(r, w) <- createPipe
|
||||
hSetEncoding r utf8_bom
|
||||
hSetEncoding w utf8_bom
|
||||
T.hPutStr w t
|
||||
hClose w
|
||||
-- use a separate thread so that we don't deadlock if we can't write all of the text at once
|
||||
forkIO $ T.hPutStr w t >> hClose w
|
||||
return r
|
||||
|
||||
-- | Like embedFile, but takes a path relative to the package directory.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user