mirror of
https://github.com/redis/go-redis.git
synced 2025-07-23 21:01:00 +03:00
fix: set timeout for WAIT command. Fixes #1963
This commit is contained in:
@ -431,6 +431,7 @@ func (c statefulCmdable) AuthACL(ctx context.Context, username, password string)
|
||||
|
||||
func (c cmdable) Wait(ctx context.Context, numSlaves int, timeout time.Duration) *IntCmd {
|
||||
cmd := NewIntCmd(ctx, "wait", numSlaves, int(timeout/time.Millisecond))
|
||||
cmd.setReadTimeout(timeout)
|
||||
_ = c(ctx, cmd)
|
||||
return cmd
|
||||
}
|
||||
|
Reference in New Issue
Block a user