forked from quic-go/quic-go
privatize the client, only expose Dial functions
This commit is contained in:
@@ -12,6 +12,7 @@ import (
|
||||
)
|
||||
|
||||
type h2quicClient interface {
|
||||
Dial() error
|
||||
Do(*http.Request) (*http.Response, error)
|
||||
}
|
||||
|
||||
@@ -92,8 +93,8 @@ func (r *QuicRoundTripper) getClient(hostname string) (h2quicClient, error) {
|
||||
|
||||
client, ok := r.clients[hostname]
|
||||
if !ok {
|
||||
var err error
|
||||
client, err = NewClient(r, r.TLSClientConfig, hostname)
|
||||
client = NewClient(r, r.TLSClientConfig, hostname)
|
||||
err := client.Dial()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user