use keepalive in quic by default

This commit is contained in:
Asim Aslam 2019-08-11 16:12:31 +01:00
parent e613b0c205
commit 56df10f68b

View File

@ -113,7 +113,7 @@ func (q *quicTransport) Dial(addr string, opts ...transport.DialOption) (transpo
NextProtos: []string{"http/1.1"},
}
}
s, err := quic.DialAddr(addr, config, nil)
s, err := quic.DialAddr(addr, config, &quic.Config{KeepAlive: true})
if err != nil {
return nil, err
}
@ -156,7 +156,7 @@ func (q *quicTransport) Listen(addr string, opts ...transport.ListenOption) (tra
}
}
l, err := quic.ListenAddr(addr, config, nil)
l, err := quic.ListenAddr(addr, config, &quic.Config{KeepAlive: true})
if err != nil {
return nil, err
}