Skip to content

Commit

Permalink
fix(agent): prevent zero value when KEEPALIVE_INTERVAL is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
haller33 committed Aug 30, 2024
1 parent 0c445e1 commit b6659b4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ type Config struct {
// Determine the interval to send the keep alive message to the server. This
// has a direct impact of the bandwidth used by the device when in idle
// state. Default is 30 seconds.
KeepAliveInterval uint `env:"KEEPALIVE_INTERVAL,default=30"`
KeepAliveInterval uint `env:"KEEPALIVE_INTERVAL,default=30,overwrite"`

// Set the device preferred hostname. This provides a hint to the server to
// use this as hostname if it is available.
Expand Down
2 changes: 1 addition & 1 deletion pkg/agent/connector/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ type Config struct {
// Determine the interval to send the keep alive message to the server. This
// has a direct impact of the bandwidth used by the device when in idle
// state. Default is 30 seconds.
KeepAliveInterval int `env:"KEEPALIVE_INTERVAL,default=30"`
KeepAliveInterval int `env:"KEEPALIVE_INTERVAL,default=30,overwrite"`
}

func LoadConfigFromEnv() (*Config, map[string]interface{}, error) {
Expand Down

0 comments on commit b6659b4

Please sign in to comment.