feat(netxlite): TLSDialer closes idle connections (#463)
We are proceeding with this plan of every major type being able to close idle connections, which will simplify making DNS resolvers. See https://github.com/ooni/probe/issues/1591.
This commit is contained in:
parent
3caf5800a2
commit
ef9592f75e
2 changed files with 24 additions and 4 deletions
|
|
@ -228,6 +228,11 @@ type TLSDialer struct {
|
|||
TLSHandshaker TLSHandshaker
|
||||
}
|
||||
|
||||
// CloseIdleConnection closes idle connections, if any.
|
||||
func (d *TLSDialer) CloseIdleConnection() {
|
||||
d.Dialer.CloseIdleConnections()
|
||||
}
|
||||
|
||||
// DialTLSContext dials a TLS connection.
|
||||
func (d *TLSDialer) DialTLSContext(ctx context.Context, network, address string) (net.Conn, error) {
|
||||
host, port, err := net.SplitHostPort(address)
|
||||
|
|
|
|||
Loading…
Reference in a new issue