]> git.saurik.com Git - redis.git/commitdiff
resolved conflict merging pietern/bpop-timeout
authorantirez <antirez@gmail.com>
Tue, 31 Aug 2010 09:23:12 +0000 (11:23 +0200)
committerantirez <antirez@gmail.com>
Tue, 31 Aug 2010 09:23:12 +0000 (11:23 +0200)
1  2 
src/t_list.c
tests/unit/type/list.tcl

diff --cc src/t_list.c
index 6b4a611e47e257ad4a8b09f90610f96533a995a8,43d292b6d6642ff7b40a40ac33f2c7191235716b..add1bee167691b1fcc382c1292c728832f6c65bd
@@@ -823,15 -834,9 +834,16 @@@ void blockingPopGenericCommand(redisCli
              }
          }
      }
 +    /* If we are inside a MULTI/EXEC and the list is empty the only thing
 +     * we can do is treating it as a timeout (even with timeout 0). */
 +    if (c->flags & REDIS_MULTI) {
 +        addReply(c,shared.nullmultibulk);
 +        return;
 +    }
 +
      /* If the list is empty or the key does not exists we must block */
-     timeout = strtol(c->argv[c->argc-1]->ptr,NULL,10);
+     timeout = lltimeout;
      if (timeout > 0) timeout += time(NULL);
      blockForKeys(c,c->argv+1,c->argc-2,timeout);
  }
Simple merge