-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update library/Rediska/PubSub/Channel.php #77
Conversation
Issue #74: unsubscribe error fix
@@ -459,7 +459,8 @@ protected function _execCommand($command, $channels) | |||
foreach($channels as $channel) { | |||
$execCommand[] = $this->getRediska()->getOption('namespace') . $channel; | |||
} | |||
$connection = $this->_connections->getConnectionByAlias($connectionAlias); | |||
if (!$connection) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$connection is returned by methods earlier and there is no need to search for it again
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Connection from prev foreach may be wrong, if channels from different connections
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, but the problem is when you unsubscribe the connection is removed from connections list and you can't find it with getConnectionByAlias later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Than move $this->_connections->removeChannel($channel)
after the getting responses.
Ok, very, very cool. We are getting there! OK, one addition! Instead of:
Please do:
Make sure to indent with 4 spaces. (Aka coding style.) All you have to do is make those changes in your branch and push again – github will update this PR! The test case: |
Made changes, sorry, but we have another pull request now, i did something wrong maybe. |
Btw, to get this branch on your localhost:
Then you are on the Then do your commits and |
Issue #74: unsubscribe error fix
#74