TUN-10388: Use pointer for suggested protocol

Switching `SuggestedProtocol` to a pointer, so we can pass nil whenever both QUIC and HTTP2 fail. We should not be suggesting anything when all our protocols have failed.
This commit is contained in:
Miguel da Costa Martins Marcelino
2026-04-29 13:36:38 +00:00
parent f827e6216b
commit cf17ba93b2
3 changed files with 53 additions and 29 deletions
+3 -2
View File
@@ -90,8 +90,9 @@ type Report struct {
Results []CheckResult
// SuggestedProtocol is the connection protocol the pre-checks recommend
// based on transport probe results.
SuggestedProtocol connection.Protocol
// based on transport probe results. Nil when no valid protocol is available
// (e.g., when both transports fail or DNS is unresolvable).
SuggestedProtocol *connection.Protocol
}
// Config controls the behavior of a pre-check Run().