Skip to content

Commit

Permalink
[ADDED] Default value for FlusherTimeout (#1398)
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrpio authored Sep 12, 2023
1 parent 7e3e54f commit 22c0f27
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions nats.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ const (
DefaultReconnectBufSize = 8 * 1024 * 1024 // 8MB
RequestChanLen = 8
DefaultDrainTimeout = 30 * time.Second
DefaultFlusherTimeout = time.Minute
LangString = "go"
)

Expand Down Expand Up @@ -154,6 +155,7 @@ func GetDefaultOptions() Options {
SubChanLen: DefaultMaxChanLen,
ReconnectBufSize: DefaultReconnectBufSize,
DrainTimeout: DefaultDrainTimeout,
FlusherTimeout: DefaultFlusherTimeout,
}
}

Expand Down Expand Up @@ -356,6 +358,7 @@ type Options struct {

// FlusherTimeout is the maximum time to wait for write operations
// to the underlying connection to complete (including the flusher loop).
// Defaults to 1m.
FlusherTimeout time.Duration

// PingInterval is the period at which the client will be sending ping
Expand Down

0 comments on commit 22c0f27

Please sign in to comment.