Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mzack9999 committed Jun 11, 2024
1 parent 19b2fb6 commit d597162
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fastdialer/dialer.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"net"
"strings"
"sync/atomic"
"time"

"github.com/Mzack9999/gcache"
gounit "github.com/docker/go-units"
Expand Down Expand Up @@ -176,7 +175,7 @@ func NewDialer(options Options) (*Dialer, error) {
}

if options.MaxTemporaryErrors > 0 && options.MaxTemporaryToPermanentDuration > 0 {
d.dialTimeoutErrors = gcache.New[string, *atomic.Uint32](MaxDialCacheSize).Expiration(30 * time.Second).Build()
d.dialTimeoutErrors = gcache.New[string, *atomic.Uint32](MaxDialCacheSize).Expiration(options.MaxTemporaryToPermanentDuration).Build()
}

return d, nil
Expand Down

0 comments on commit d597162

Please sign in to comment.