Decrease the max size of the handshake message

This commit is contained in:
Zoltán Papp 2024-09-10 16:31:36 +02:00
parent d3e7e6bc9c
commit 1d233a5b5e
2 changed files with 3 additions and 2 deletions

View File

@ -249,7 +249,7 @@ func (c *Client) handShake() error {
log.Errorf("failed to send auth message: %s", err)
return err
}
buf := make([]byte, messages.MaxHandshakeSize)
buf := make([]byte, messages.MaxHandshakeRespSize)
n, err := c.readWithTimeout(buf)
if err != nil {
log.Errorf("failed to read auth response: %s", err)

View File

@ -7,7 +7,8 @@ import (
)
const (
MaxHandshakeSize = 8192
MaxHandshakeSize = 212
MaxHandshakeRespSize = 8192
CurrentProtocolVersion = 1