Bugfix rpc handshake

This commit is contained in:
9seconds
2018-07-04 11:28:08 +03:00
parent ffa7ef7a0a
commit 90c10519ee
17 changed files with 129 additions and 62 deletions
+3 -1
View File
@@ -14,6 +14,8 @@ const telegramDialTimeout = 10 * time.Second
type tgDialer struct {
net.Dialer
conf *config.Config
}
func (t *tgDialer) dial(addr string) (net.Conn, error) {
@@ -34,5 +36,5 @@ func (t *tgDialer) dialRWC(addr string) (wrappers.ReadWriteCloserWithAddr, error
return nil, err
}
return wrappers.NewTimeoutRWC(conn), nil
return wrappers.NewTimeoutRWC(conn, t.conf.PublicIPv4, t.conf.PublicIPv6), nil
}