Browse Source

addressing comments made during PR

eric 10 years ago
parent
commit
a816b4210e
2 changed files with 2 additions and 2 deletions
  1. 1 0
      CHANGELOG.md
  2. 1 2
      config.go

+ 1 - 0
CHANGELOG.md

@@ -7,6 +7,7 @@ Improvements:
    ([#389](https://github.com/Shopify/sarama/pull/389)).
  - The consumer produces much more useful logging output when leadership
    changes ([#385](https://github.com/Shopify/sarama/pull/385)).
+ - Added support for tcp keepalives ([#407](https://github.com/Shopify/sarama/issues/407)).
 
 Bug Fixes:
  - The OffsetCommitRequest message now correctly implements all three possible

+ 1 - 2
config.go

@@ -14,7 +14,7 @@ type Config struct {
 		WriteTimeout time.Duration // How long to wait for a transmit to succeed before timing out and returning an error (default 30s).
 
 		// KeepAlive specifies the keep-alive period for an active network connection.
-		// If zero, keep-alives are not enabled.
+		// If zero, keep-alives are disabled. (default is 0: disabled).
 		KeepAlive time.Duration
 	}
 
@@ -130,7 +130,6 @@ func NewConfig() *Config {
 	c.Net.DialTimeout = 30 * time.Second
 	c.Net.ReadTimeout = 30 * time.Second
 	c.Net.WriteTimeout = 30 * time.Second
-	c.Net.KeepAlive = 0 * time.Second
 
 	c.Metadata.Retry.Max = 3
 	c.Metadata.Retry.Backoff = 250 * time.Millisecond