Skip to content

Commit

Permalink
remove closed dialer reference
Browse files Browse the repository at this point in the history
  • Loading branch information
tarunKoyalwar committed May 22, 2024
1 parent c20d42b commit b8c2f94
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/protocols/common/protocolinit/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ import (

// Init initializes the client pools for the protocols
func Init(options *types.Options) error {
if err := protocolstate.Init(options); err != nil {
return err
}
if err := dnsclientpool.Init(options); err != nil {
return err
}
Expand All @@ -36,4 +39,5 @@ func Init(options *types.Options) error {

func Close() {
protocolstate.Dialer.Close()
protocolstate.Dialer = nil
}
1 change: 1 addition & 0 deletions pkg/protocols/common/protocolstate/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ func interfaceAddresses(interfaceName string) ([]net.Addr, error) {
func Close() {
if Dialer != nil {
Dialer.Close()
Dialer = nil
}
StopActiveMemGuardian()
}

0 comments on commit b8c2f94

Please sign in to comment.