clean up protocol version for proxying

The proxy always checks the protocol version of a remote before talking
to it in a version-specific way, so the protocol version in the ProxyParams
is the client's protocol version. The remote will always be at the same or
an older protocol version than the client.

Note that in relayDATAFinish, when the client is at protocol version 0,
the remote must thus be as well, and that's why its version is not
checked in the case for that.

With that clarified, it's evident that, in P2P.Http.State, there's no
need to look at the proxied remote's protocol version at all.
This commit is contained in:
Joey Hess 2024-07-26 13:39:43 -04:00
parent de7730f51f
commit ad025b8e5e
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
5 changed files with 17 additions and 23 deletions

View file

@ -84,7 +84,7 @@ performProxy clientuuid servermode r = do
, proxyUUID = Remote.uuid r
, proxySelector = singleProxySelector remoteside
, proxyConcurrencyConfig = concurrencyconfig
, proxyProtocolVersion = protocolversion
, proxyClientProtocolVersion = protocolversion
}
let runproxy othermsg' = proxy closer proxyparams
othermsg' errhandler