add connProcess to P2PConnection
When using the new generic P2P transport to open an outgoing connection to a peer, this will hold the pid of the git-annex-p2p-<netname> command. closeConnection simply waits for it. Rather than relying on garbage collection of the closed handles to close it. In Remote.Helper.Ssh, connProcess is set to Nothing, even though there is a similar process being used there. That code stores the pid in OpenConnection instead, and handles waiting for it itself. A bit ugly, but not worth cleaning up at this point, maybe later.
This commit is contained in:
parent
f631bc9e56
commit
a6f8248465
6 changed files with 13 additions and 2 deletions
|
@ -270,6 +270,7 @@ openP2PShellConnection' r maxprotoversion bypass = do
|
|||
, P2P.connCheckAuth = const False
|
||||
, P2P.connIhdl = P2P.P2PHandle to
|
||||
, P2P.connOhdl = P2P.P2PHandle from
|
||||
, P2P.connProcess = Nothing
|
||||
, P2P.connIdent = P2P.ConnIdent $
|
||||
Just $ "git-annex-shell connection " ++ show pidnum
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue