Use new missinggo.SplitHostMaybePort implementation

This commit is contained in:
Matt Joiner 2016-03-15 21:32:47 +11:00
parent 0d5502932d
commit b6cd456779
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -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