Merge pull request #179 from maxsupermanhd/patch-1

Don't send empty host string in handshake
This commit is contained in:
Tnze
2022-05-04 22:11:51 +08:00
committed by GitHub

View File

@ -41,6 +41,7 @@ func (c *Client) join(ctx context.Context, d *mcnet.Dialer, addr string) error {
var addrErr *net.AddrError
const missingPort = "missing port in address"
if errors.As(err, &addrErr) && addrErr.Err == missingPort {
host = addr
port = 25565
} else {
return LoginErr{"split address", err}