refactor(dialer): it should close idle connections (#457)

Like we did before for the resolver, a dialer should propagate the
request to close idle connections to underlying types.

See https://github.com/ooni/probe/issues/1591
This commit is contained in:
Simone Basso 2021-09-05 19:55:28 +02:00 committed by GitHub
commit 7a9499fee3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 207 additions and 36 deletions

View file

@ -209,7 +209,7 @@ func NewTLSDialer(config Config) TLSDialer {
config.TLSConfig.InsecureSkipVerify = config.NoTLSVerify
return &netxlite.TLSDialer{
Config: config.TLSConfig,
Dialer: config.Dialer,
Dialer: netxlite.NewDialerLegacyAdapter(config.Dialer),
TLSHandshaker: h,
}
}