close handles
This commit is contained in:
parent
efa5b12516
commit
c008813bec
|
@ -325,10 +325,14 @@ gitPush hin hout = void $ fromstdin `concurrently` tostdout
|
||||||
connect fromh toh = do
|
connect fromh toh = do
|
||||||
b <- B.hGetSome fromh 40960
|
b <- B.hGetSome fromh 40960
|
||||||
hPutStrLn stderr $ show ("from", fromh, "to", toh, b)
|
hPutStrLn stderr $ show ("from", fromh, "to", toh, b)
|
||||||
unless (B.null b) $ do
|
if B.null b
|
||||||
B.hPut toh b
|
then do
|
||||||
hFlush toh
|
hClose fromh
|
||||||
connect fromh toh
|
hClose toh
|
||||||
|
else do
|
||||||
|
B.hPut toh b
|
||||||
|
hFlush toh
|
||||||
|
connect fromh toh
|
||||||
|
|
||||||
hasOrigin :: IO Bool
|
hasOrigin :: IO Bool
|
||||||
hasOrigin = do
|
hasOrigin = do
|
||||||
|
|
Loading…
Reference in New Issue