Skip to content

Commit

Permalink
feat: remove deprecated GetHostname and remove client host resolving
Browse files Browse the repository at this point in the history
  • Loading branch information
emiago committed Nov 24, 2024
1 parent 6f44937 commit 0cf3260
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,16 +103,6 @@ func NewClient(ua *UserAgent, options ...ClientOption) (*Client, error) {
}
}

if c.host == "" {
// IF we remove this, default would be IPV6 on new system
// We can go on net libraries and forcing this with udp4, tcp4
h, _, err := sip.ResolveInterfacesIP("ip4", nil)
if err != nil {
return nil, err
}
c.host = h.String()
}

return c, nil
}

Expand All @@ -121,11 +111,6 @@ func (c *Client) Close() error {
return nil
}

// Deprecated use Hostname
func (c *Client) GetHostname() string {
return c.host
}

// Hostname returns default hostname or what is set WithHostname option
func (c *Client) Hostname() string {
return c.host
Expand Down

0 comments on commit 0cf3260

Please sign in to comment.