From d7e1c69c24d0a6e69cf811ae916f0bab46c50e0c Mon Sep 17 00:00:00 2001 From: Maxim Zhuchkov Date: Wed, 4 May 2022 03:38:35 +0300 Subject: [PATCH] Don't send empty host string in handshake --- bot/mcbot.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bot/mcbot.go b/bot/mcbot.go index 7f0a000..5b89e01 100644 --- a/bot/mcbot.go +++ b/bot/mcbot.go @@ -51,6 +51,9 @@ func (c *Client) join(ctx context.Context, d *mcnet.Dialer, addr string) error { return LoginErr{"parse port", err} } } + if host == "" { + host = addr + } // Dial connection c.Conn, err = d.DialMCContext(ctx, addr)