Skip to content

Commit b31f154

Browse files
authored
Merge pull request #156 from ethpandaops/fix/keepalive
fix(output): use pointer for false keepAlive config
2 parents 765b78d + f923e85 commit b31f154

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pkg/output/http/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ type Config struct {
1313
ExportTimeout time.Duration `yaml:"exportTimeout" default:"30s"`
1414
MaxExportBatchSize int `yaml:"maxExportBatchSize" default:"512"`
1515
Compression CompressionStrategy `yaml:"compression" default:"none"`
16-
KeepAlive bool `yaml:"keepAlive" default:"true"`
16+
KeepAlive *bool `yaml:"keepAlive" default:"true"`
1717
}
1818

1919
func (c *Config) Validate() error {

pkg/output/http/exporter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ type ItemExporter struct {
2222

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

0 commit comments

Comments
 (0)