mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-09-02 00:11:56 +03:00
More correct error if no addresses are found
This commit is contained in:
@@ -28,10 +28,9 @@ func (t Telegram) Dial(ctx context.Context, dc int) (essentials.Conn, error) {
|
||||
addresses = append(t.pool.getV6(dc), t.pool.getV4(dc)...)
|
||||
}
|
||||
|
||||
var (
|
||||
conn essentials.Conn
|
||||
err error
|
||||
)
|
||||
var conn essentials.Conn
|
||||
|
||||
err := ErrNoAddresses
|
||||
|
||||
for _, v := range addresses {
|
||||
conn, err = t.dialer.DialContext(ctx, v.network, v.address)
|
||||
|
||||
Reference in New Issue
Block a user