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

Fatal on call $conn->close() if connection was not created. #16

Closed
DangerLifter opened this issue Feb 1, 2015 · 2 comments · Fixed by #45
Closed

Fatal on call $conn->close() if connection was not created. #16

DangerLifter opened this issue Feb 1, 2015 · 2 comments · Fixed by #45
Assignees
Labels
Milestone

Comments

@DangerLifter
Copy link

Query/Executor::doQuer(). if createConnection throws exception (eg. ErrorException: stream_socket_client(): unable to connect to udp://8.8.8.8:53 (Network is unreachable) if not internet connections) than timeout timer calls $conn->close() on "null object", which causes fatal: PHP Fatal error: Call to a member function close() on a non-object in /var/www/projects/DomainScrapper/vendor/react/dns/Query/Executor.php on line 62

@clue clue modified the milestone: v0.5 Feb 24, 2016
@davidwdan
Copy link

This seems like a pretty serious issue to be left unaddressed for over a year.

I run into this every time that my laptop wakes up and a script tries to reconnect before the network is up.

@clue clue added the bug label Nov 16, 2016
@clue clue modified the milestones: v0.4.4, v0.5 Feb 12, 2017
@clue
Copy link
Member

clue commented Feb 12, 2017

For the reference: This bug has actually been addressed somewhat indirectly via reactphp/stream#9 a looong time ago. Ever since this change is in, it should pass through an uncaught exception, but should no longer try to invoke an invalid method on a non-object.

Obviously, this behavior is still broken, so I've just filed #45 that updates the dependencies, handles these exceptions and adds some tests to verify this should no longer happen.

@clue clue self-assigned this Feb 12, 2017
@clue clue closed this as completed in #45 Feb 13, 2017
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 a pull request may close this issue.

3 participants