Skip to content

Commit

Permalink
Merge pull request #156 from ethpandaops/fix/keepalive
Browse files Browse the repository at this point in the history
fix(output): use pointer for false keepAlive config
  • Loading branch information
Savid authored Aug 8, 2023
2 parents 765b78d + f923e85 commit b31f154
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/output/http/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type Config struct {
ExportTimeout time.Duration `yaml:"exportTimeout" default:"30s"`
MaxExportBatchSize int `yaml:"maxExportBatchSize" default:"512"`
Compression CompressionStrategy `yaml:"compression" default:"none"`
KeepAlive bool `yaml:"keepAlive" default:"true"`
KeepAlive *bool `yaml:"keepAlive" default:"true"`
}

func (c *Config) Validate() error {
Expand Down
2 changes: 1 addition & 1 deletion pkg/output/http/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ type ItemExporter struct {

func NewItemExporter(name string, config *Config, log logrus.FieldLogger) (ItemExporter, error) {
t := http.DefaultTransport.(*http.Transport).Clone()
if !config.KeepAlive {
if config.KeepAlive != nil && !*config.KeepAlive {
t.DisableKeepAlives = true
}

Expand Down

0 comments on commit b31f154

Please sign in to comment.