1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-29 17:41:15 +03:00

fix iterator for hscan/sscan/zscan

This commit is contained in:
Yin Jifeng
2016-08-04 12:52:00 +08:00
parent bc66ed0eba
commit 91993128b0
2 changed files with 29 additions and 1 deletions

View File

@ -52,7 +52,11 @@ func (it *ScanIterator) Next() bool {
}
// Fetch next page.
it.ScanCmd._args[1] = it.ScanCmd.cursor
if it.ScanCmd._args[0] == "scan" {
it.ScanCmd._args[1] = it.ScanCmd.cursor
} else {
it.ScanCmd._args[2] = it.ScanCmd.cursor
}
it.ScanCmd.reset()
it.client.process(it.ScanCmd)
if it.ScanCmd.Err() != nil {