Merge pull request #2138 from mikerott/dev

protect against multiple unnecessary Init calls
dev
Sandeep Singh 2022-06-10 18:12:31 +05:30 committed by GitHub
commit 5281d342c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -12,6 +12,9 @@ var Dialer *fastdialer.Dialer
// Init creates the Dialer instance based on user configuration
func Init(options *types.Options) error {
if Dialer != nil {
return nil
}
opts := fastdialer.DefaultOptions
if options.SystemResolvers {
opts.EnableFallback = true