mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-12 16:39:09 +02:00
Reject MaxBatchSize in runtime SetPerformance
This commit is contained in:
@@ -508,6 +508,9 @@ func (c *Client) VerifySSHHostKey(peerAddress string, key []byte) error {
|
|||||||
// Returns ErrClientNotStarted / ErrEngineNotStarted if the Client is not
|
// Returns ErrClientNotStarted / ErrEngineNotStarted if the Client is not
|
||||||
// running yet.
|
// running yet.
|
||||||
func (c *Client) SetPerformance(t Performance) error {
|
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()
|
engine, err := c.getEngine()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|||||||
Reference in New Issue
Block a user