File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
cmd/mcp-victorialogs/config Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -50,15 +50,15 @@ func InitConfig() (*Config, error) {
5050}
5151}
5252
53- var heartbeatInterval time.Duration
53+ heartbeatInterval := 30 * time .Second
5454heartbeatIntervalStr := os .Getenv ("MCP_HEARTBEAT_INTERVAL" )
5555if heartbeatIntervalStr != "" {
5656interval , err := time .ParseDuration (heartbeatIntervalStr )
5757if err != nil {
5858return nil , fmt .Errorf ("failed to parse MCP_HEARTBEAT_INTERVAL: %w" , err )
5959}
60- if interval <= 0 {
61- return nil , fmt .Errorf ("MCP_HEARTBEAT_INTERVAL must be greater than 0 " )
60+ if interval < 0 {
61+ return nil , fmt .Errorf ("MCP_HEARTBEAT_INTERVAL must be a non-negative " )
6262}
6363heartbeatInterval = interval
6464}
@@ -132,9 +132,6 @@ func (c *Config) IsToolDisabled(toolName string) bool {
132132}
133133
134134func (c * Config ) HeartbeatInterval () time.Duration {
135- if c .heartbeatInterval <= 0 {
136- return 30 * time .Second // Default heartbeat interval
137- }
138135return c .heartbeatInterval
139136}
140137
You can’t perform that action at this time.
0 commit comments