TUN-6343: Fix QUIC->HTTP2 fallback

This commit is contained in:
Nuno Diegues 2022-06-03 10:15:52 +01:00
parent 2b0d704777
commit 4ccef23dbc
2 changed files with 1 additions and 10 deletions

View File

@ -18,15 +18,6 @@ func (e DupConnRegisterTunnelError) Error() string {
return "already connected to this server, trying another address" return "already connected to this server, trying another address"
} }
// Dial to edge server with quic failed
type EdgeQuicDialError struct {
Cause error
}
func (e EdgeQuicDialError) Error() string {
return "failed to dial to edge with quic: " + e.Cause.Error()
}
// RegisterTunnel error from server // RegisterTunnel error from server
type ServerRegisterTunnelError struct { type ServerRegisterTunnelError struct {
Cause error Cause error

View File

@ -55,7 +55,7 @@ func NewQUICConnection(
) (*QUICConnection, error) { ) (*QUICConnection, error) {
session, err := quic.DialAddr(edgeAddr.String(), tlsConfig, quicConfig) session, err := quic.DialAddr(edgeAddr.String(), tlsConfig, quicConfig)
if err != nil { if err != nil {
return nil, EdgeQuicDialError{Cause: err} return nil, fmt.Errorf("failed to dial to edge: %w", err)
} }
datagramMuxer, err := quicpogs.NewDatagramMuxer(session, logger) datagramMuxer, err := quicpogs.NewDatagramMuxer(session, logger)