dup stdio handles for P2P proxy
Special remotes might output to stdout, or read from stdin, which would mess up the P2P protocol. So dup the handles to avoid any such problem.
This commit is contained in:
parent
cecd151e23
commit
0dfdc9f951
3 changed files with 17 additions and 9 deletions
|
@ -99,7 +99,7 @@ performProxyCluster clientuuid clusteruuid servermode = do
|
|||
proxyClientSide :: UUID -> Annex ClientSide
|
||||
proxyClientSide clientuuid = do
|
||||
clientrunst <- liftIO (mkRunState $ Serving clientuuid Nothing)
|
||||
return $ ClientSide clientrunst (stdioP2PConnection Nothing)
|
||||
ClientSide clientrunst <$> liftIO (stdioP2PConnectionDupped Nothing)
|
||||
|
||||
p2pErrHandler :: Annex () -> (a -> CommandPerform) -> Annex (Either ProtoFailure a) -> CommandPerform
|
||||
p2pErrHandler closeconn cont a = a >>= \case
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue