Don't send empty host string in handshake

This commit is contained in:
Maxim Zhuchkov
2022-05-04 03:38:35 +03:00
committed by GitHub
parent 197e37017c
commit d7e1c69c24

View File

@ -51,6 +51,9 @@ func (c *Client) join(ctx context.Context, d *mcnet.Dialer, addr string) error {
return LoginErr{"parse port", err} return LoginErr{"parse port", err}
} }
} }
if host == "" {
host = addr
}
// Dial connection // Dial connection
c.Conn, err = d.DialMCContext(ctx, addr) c.Conn, err = d.DialMCContext(ctx, addr)