Skip to content

Commit

Permalink
Fix ip resolve
Browse files Browse the repository at this point in the history
  • Loading branch information
waybackarchiver committed Aug 7, 2021
1 parent 13003ea commit d0990b5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion telegram/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
package telegram

import (
"net"
"reflect"
"runtime"
"strconv"

"github.com/pkg/errors"
"github.com/xelaj/errs"
Expand Down Expand Up @@ -119,7 +121,7 @@ func NewClient(c ClientConfig) (*Client, error) { //nolint: gocritic arg is not
continue
}

dcList[int(dc.ID)] = dc.IpAddress + ":" + strconv.Itoa(int(dc.Port))
dcList[int(dc.ID)] = net.JoinHostPort(dc.IpAddress, strconv.Itoa(int(dc.Port)))
}
client.SetDCList(dcList)
return client, nil
Expand Down

0 comments on commit d0990b5

Please sign in to comment.