Fix ISSUE #27.

This commit is contained in:
Daniele Alessandri
2011-03-30 23:45:18 +02:00
parent 785d0f429f
commit e5f010deb8
2 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -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
View File
@@ -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;