MCPcopy
hub / github.com/redis/go-redis / cmdTimeout

Method cmdTimeout

redis.go:1019–1028  ·  view source on GitHub ↗
(cmd Cmder)

Source from the content-addressed store, hash-verified

1017}
1018
1019func (c *baseClient) cmdTimeout(cmd Cmder) time.Duration {
1020 if timeout := cmd.readTimeout(); timeout != nil {
1021 t := *timeout
1022 if t == 0 {
1023 return 0
1024 }
1025 return t + 10*time.Second
1026 }
1027 return c.opt.ReadTimeout
1028}
1029
1030// context returns the context for the current connection.
1031// If the context timeout is enabled, it returns the original context.

Callers 1

_processMethod · 0.95

Calls 1

readTimeoutMethod · 0.65

Tested by

no test coverage detected