Use new missinggo.SplitHostMaybePort implementation
This commit is contained in:
parent
0d5502932d
commit
b6cd456779
|
@ -2533,7 +2533,7 @@ func (me *Client) DHT() *dht.Server {
|
|||
|
||||
func (me *Client) AddDHTNodes(nodes []string) {
|
||||
for _, n := range nodes {
|
||||
hmp := missinggo.SplitHostPort(n)
|
||||
hmp := missinggo.SplitHostMaybePort(n)
|
||||
ip := net.ParseIP(hmp.Host)
|
||||
if ip == nil {
|
||||
log.Printf("won't add DHT node with bad IP: %q", hmp.Host)
|
||||
|
|
|
@ -250,7 +250,7 @@ func (c *udpClient) Connect() (err error) {
|
|||
}
|
||||
c.connectionId = connectRequestConnectionId
|
||||
if c.socket == nil {
|
||||
hmp := missinggo.SplitHostPort(c.url.Host)
|
||||
hmp := missinggo.SplitHostMaybePort(c.url.Host)
|
||||
if hmp.NoPort {
|
||||
hmp.NoPort = false
|
||||
hmp.Port = 80
|
||||
|
|
Loading…
Reference in New Issue