Skip to content
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

Change isActive check. #6

Closed
wants to merge 1 commit into from
Closed

Change isActive check. #6

wants to merge 1 commit into from

Conversation

oyajiro
Copy link

@oyajiro oyajiro commented Apr 23, 2015

When redis-server daemon down. open() return false in $this->_socket, and if we check isActive() we recieve true even if server not work.

@samdark
Copy link
Member

samdark commented Apr 23, 2015

Why?

@samdark
Copy link
Member

samdark commented Apr 23, 2015

I don't think the change is correct.

@samdark samdark closed this Apr 23, 2015
@klimov-paul
Copy link
Member

@oyajiro, it better you open an issue, which describes your problem in details. Then we will consider possible solution.

@oyajiro
Copy link
Author

oyajiro commented Apr 23, 2015

If i understand correctly
$this->_socket = @stream_socket_client(
$this->unixSocket ? 'unix://' . $this->unixSocket : 'tcp://' . $this->hostname . ':' . $this->port,
$errorNumber,
$errorDescription,
$this->connectionTimeout ? $this->connectionTimeout : ini_get("default_socket_timeout")
);
on this line, if redis down, it return false. And in _socket we get false. And then, if we run isActive() it compare with false, and return true.
Ok, i try to open issue

@samdark samdark reopened this Apr 23, 2015
@samdark
Copy link
Member

samdark commented Apr 23, 2015

No need to open it now since you've explained it :)

@samdark samdark added the type:bug Bug label Apr 23, 2015
@samdark
Copy link
Member

samdark commented Apr 23, 2015

If such behavior is verified it should be changed to more explicit check and there should be a tests for it not to modify it back.

@samdark samdark added this to the 2.0.5 milestone May 25, 2015
@cebe
Copy link
Member

cebe commented Mar 1, 2016

already fixed by #37

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants