fix: set timeout for WAIT command. Fixes #1963

This commit is contained in:
Vladimir Mihailenco 2021-12-26 16:42:17 +02:00
parent f737d9a830
commit 333fee1a8f
1 changed files with 1 additions and 0 deletions

View File

@ -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 { func (c cmdable) Wait(ctx context.Context, numSlaves int, timeout time.Duration) *IntCmd {
cmd := NewIntCmd(ctx, "wait", numSlaves, int(timeout/time.Millisecond)) cmd := NewIntCmd(ctx, "wait", numSlaves, int(timeout/time.Millisecond))
cmd.setReadTimeout(timeout)
_ = c(ctx, cmd) _ = c(ctx, cmd)
return cmd return cmd
} }