From 7a778d74d0e6d64b480a48761cce41a5cfa1b948 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=8B=E3=81=AE=E3=81=8B=E3=81=88=E3=81=A7?= Date: Wed, 31 Mar 2021 22:55:28 +0800 Subject: [PATCH] feat: change the handshake timeout of quic to default vaule --- app/dns/nameserver_quic.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/dns/nameserver_quic.go b/app/dns/nameserver_quic.go index 241f336b..05cfd8e7 100644 --- a/app/dns/nameserver_quic.go +++ b/app/dns/nameserver_quic.go @@ -27,8 +27,6 @@ import ( // by selecting the ALPN token "dq" in the crypto handshake. const NextProtoDQ = "doq-i00" -const handshakeTimeout = time.Second * 8 - // QUICNameServer implemented DNS over QUIC type QUICNameServer struct { sync.RWMutex @@ -373,9 +371,7 @@ func (s *QUICNameServer) getSession() (quic.Session, error) { func (s *QUICNameServer) openSession() (quic.Session, error) { tlsConfig := tls.Config{} - quicConfig := &quic.Config{ - HandshakeTimeout: handshakeTimeout, - } + quicConfig := &quic.Config{} session, err := quic.DialAddrContext(context.Background(), s.destination.NetAddr(), tlsConfig.GetTLSConfig(tls.WithNextProto("http/1.1", http2.NextProtoTLS, NextProtoDQ)), quicConfig) if err != nil {