mirror of
https://github.com/predis/predis.git
synced 2026-09-04 23:08:00 +00:00
Fix ISSUE #27.
This commit is contained in:
@@ -27,7 +27,7 @@ v0.6.6 (2011-xx-xx)
|
||||
* SUBSCRIBE and PSUBSCRIBE can accept a list of channels for subscription.
|
||||
|
||||
* FIX: some client-side clean-ups for MULTI/EXEC were handled incorrectly in
|
||||
a couple of corner cases.
|
||||
a couple of corner cases. See also ISSUE #27.
|
||||
|
||||
v0.6.5 (2011-02-12)
|
||||
* FIX: due to an untested internal change introduced in v0.6.4, a wrong
|
||||
|
||||
+4
-3
@@ -1062,8 +1062,9 @@ class MultiExecBlock {
|
||||
}
|
||||
|
||||
public function discard() {
|
||||
if ($this->_initialized === true || $this->_checkAndSet) {
|
||||
$this->_redisClient->discard();
|
||||
if ($this->_initialized === true) {
|
||||
$command = $this->_checkAndSet ? 'unwatch' : 'discard';
|
||||
$this->_redisClient->$command();
|
||||
$this->reset();
|
||||
$this->_discarded = true;
|
||||
}
|
||||
@@ -1132,7 +1133,7 @@ class MultiExecBlock {
|
||||
|
||||
if (count($this->_commands) === 0) {
|
||||
if ($this->_watchedKeys) {
|
||||
$this->_redisClient->discard();
|
||||
$this->discard();
|
||||
return;
|
||||
}
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user