clean P2P protocol shutdown on EOF
Avoids "git-annex-shell: <stdin>: hGetChar: end of file" being displayed by the test suite, due to the way it runs git-annex-shell without using ssh. git-annex-shell over ssh was not affected because git-annex hangs up the ssh connection and so never sees the error message that git-annnex-shell probably did emit. This commit was sponsored by Ryan Newton on Patreon.
This commit is contained in:
parent
e4d1914e3a
commit
b18fb1e343
3 changed files with 11 additions and 2 deletions
|
@ -113,6 +113,8 @@ dupIoHandles = do
|
|||
- This implementation is not super efficient, but as long as the Handle
|
||||
- supports buffering, it avoids reading a character at a time at the
|
||||
- syscall level.
|
||||
-
|
||||
- Throws isEOFError when no more input is available.
|
||||
-}
|
||||
getProtocolLine :: Handle -> IO (Maybe String)
|
||||
getProtocolLine h = go (32768 :: Int) []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue