openedProxyConnection
:: UUID
+ -> String
-> Proxy.ProxySelector
-> Annex ()
-> Proxy.ConcurrencyConfig
- -> IO ProxyConnection
-openedProxyConnection u selector closer concurrency = do
- now <- getPOSIXTime
- return $ ProxyConnection u selector closer concurrency now
+ -> Annex ProxyConnection
+openedProxyConnection u desc selector closer concurrency = do
+ now <- liftIO getPOSIXTime
+ fastDebug "P2P.Http" ("Opened proxy connection to " ++ desc)
+ return $ ProxyConnection u selector closer' concurrency now
+ where
+ closer' = do
+ fastDebug "P2P.Http" ("Closing proxy connection to " ++ desc)
+ closer
+ fastDebug "P2P.Http" ("Closed proxy connection to " ++ desc)
openProxyConnectionToRemote
:: AnnexWorkerPool
inAnnexWorker' workerpool $ do
remoteside <- proxyRemoteSide clientmaxversion bypass remote
concurrencyconfig <- Proxy.noConcurrencyConfig
- liftIO $ openedProxyConnection (Remote.uuid remote)
+ openedProxyConnection (Remote.uuid remote)
+ ("remote " ++ Remote.name remote)
(Proxy.singleProxySelector remoteside)
(Proxy.closeRemoteSide remoteside)
concurrencyconfig
(proxyselector, closenodes) <-
clusterProxySelector clusteruuid clientmaxversion bypass
concurrencyconfig <- Proxy.mkConcurrencyConfig concurrency
- liftIO $ openedProxyConnection (fromClusterUUID clusteruuid)
+ openedProxyConnection (fromClusterUUID clusteruuid)
+ ("cluster " ++ fromUUID (fromClusterUUID clusteruuid))
proxyselector closenodes concurrencyconfig
type ProxyConnectionPool = (Integer, M.Map ProxyConnectionPoolKey [ProxyConnection])
over http leaves open the connection to the cluster, so the next request
opens another one.
- So does an interrupted PUT directly to the proxied ;
+ So does an interrupted PUT directly to the proxied
special remote over http.
* When part of a file has been sent to a cluster via the http server,