Skip to content

Commit

Permalink
Merge pull request #109 from waybackarchiver/bugfix-ip-resolve
Browse files Browse the repository at this point in the history
Fix ip resolve
  • Loading branch information
quenbyako authored Aug 16, 2021
2 parents 13003ea + d0990b5 commit 5eb6237
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 5eb6237

Please sign in to comment.