Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: add comments to ConnWriteTimeout as a request timeout #469

Merged
merged 2 commits into from
Feb 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion rueidis.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,9 @@ type ClientOption struct {
// The default for cluster clients is 0, which means 1 connection (2^0).
PipelineMultiplex int

// ConnWriteTimeout is applied net.Conn.SetWriteDeadline and periodic PING to redis
// ConnWriteTimeout is read/write timeout for each connection. If specified,
// it is used to control the maximum duration waits for responses to pipeline commands.
// Also, ConnWriteTimeout is applied net.Conn.SetDeadline and periodic PING to redis
// Since the Dialer.KeepAlive will not be triggered if there is data in the outgoing buffer,
// ConnWriteTimeout should be set in order to detect local congestion or unresponsive redis server.
// This default is ClientOption.Dialer.KeepAlive * (9+1), where 9 is the default of tcp_keepalive_probes on Linux.
Expand Down