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