Reject MaxBatchSize in runtime SetPerformance

This commit is contained in:
Viktor Liu
2026-05-22 17:57:42 +02:00
parent 39ee9c5986
commit e31be52ff3

View File

@@ -508,6 +508,9 @@ func (c *Client) VerifySSHHostKey(peerAddress string, key []byte) error {
// Returns ErrClientNotStarted / ErrEngineNotStarted if the Client is not
// running yet.
func (c *Client) SetPerformance(t Performance) error {
if t.MaxBatchSize != nil {
return errors.New("MaxBatchSize is construction-only and cannot be changed at runtime")
}
engine, err := c.getEngine()
if err != nil {
return err