refactor(netx): the TimeoutDialer is useless (#366)

We already configure a timeout in the underlying dialer, hence
there's no point in keeping the TimeoutDialer around.

Part of https://github.com/ooni/probe/issues/1507
This commit is contained in:
Simone Basso 2021-06-08 21:56:57 +02:00 committed by GitHub
commit 8ad17775fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 21 additions and 100 deletions

View file

@ -147,7 +147,6 @@ func NewDialer(config Config) Dialer {
config.FullResolver = NewResolver(config)
}
var d Dialer = dialer.Default
d = dialer.TimeoutDialer{Dialer: d}
d = dialer.ErrorWrapperDialer{Dialer: d}
if config.Logger != nil {
d = dialer.LoggingDialer{Dialer: d, Logger: config.Logger}