clean up after http p2p proxy GET is interrupted
authorJoey Hess <joeyh@joeyh.name>
Fri, 26 Jul 2024 19:25:15 +0000 (15:25 -0400)
committerJoey Hess <joeyh@joeyh.name>
Fri, 26 Jul 2024 19:33:20 +0000 (15:33 -0400)
commit267a202e72b9dddf5c3950b97a5824f4e31bcc11
tree7d7eb03d009f66ac92375bfb5c1fe783ce4fd78b
parent5ebbb31b36fb000756364edc607589218653c121
clean up after http p2p proxy GET is interrupted

There was an annex worker thread that did not get stopped.

It was stuck in ReceiveMessage from the P2PHandleTMVar.

Fixed by making P2PHandleTMVar closeable.

In serveGet, releaseP2PConnection has to come first, else the
annexworker may not shut down, if it's waiting to read from it.

In proxyConnection, call closeRemoteSide in order to wait for the ssh
process (for example).
Annex/Proxy.hs
P2P/Http/Server.hs
P2P/Http/State.hs
P2P/IO.hs