mirror of
https://github.com/predis/predis.git
synced 2026-08-30 20:21:31 +00:00
Perform (p)unsubscribtion only if (p)subscribed to a channel when the destructor for Predis\PubSubContext is invoked.
This commit is contained in:
+1
-4
@@ -998,10 +998,7 @@ class PubSubContext implements \Iterator {
|
||||
}
|
||||
|
||||
public function __destruct() {
|
||||
if ($this->valid()) {
|
||||
$this->_redisClient->unsubscribe();
|
||||
$this->_redisClient->punsubscribe();
|
||||
}
|
||||
$this->closeContext();
|
||||
}
|
||||
|
||||
private function checkCapabilities(Client $redisClient) {
|
||||
|
||||
Reference in New Issue
Block a user