Skip to content

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

Description

@DangerLifter

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

Activity

  1. modified the milestone: on Feb 24, 2016
  2. davidwdan commented on Jun 14, 2016

    @davidwdan

    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.

  3. modified the milestones: v0.4.4, on Feb 12, 2017
  4. clue commented on Feb 12, 2017

    @clue
    Member

    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.

  5. self-assigned this
    on Feb 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions