Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upConnection is not closed after close() #1733
Open
Labels
Comments
|
@hserge phpredis automatically reconnects when you call commands after |
|
@yatsukhnenko probably makes sense to add this "hidden" feature to the close() method description. |
|
@hserge to check the connection state you can use isConnected method |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expected behavior
When connection is closed by close(), consecutive commands should fail or throw an exception.
Actual behaviour
After closing the connection consecutive commands are run as connection is still open.
I'm seeing this behaviour on
Steps to reproduce, backtrace or example script
$r = new Redis();
$con = $r->connect('127.0.0.1'); // returns true
$r->close(); // returns true
$info = $r->info(); // returns array of info
$r->select(15); // returns true
$data = $r->xRange('payday', '-', '+'); // returns data from the stream
I've checked
developbranch