Skip to content
This repository was archived by the owner on Jan 9, 2025. It is now read-only.
This repository was archived by the owner on Jan 9, 2025. It is now read-only.

[Bug] Error when closing Mink session on Windows #130

@csarrazi

Description

@csarrazi

When stopping the server, the Connection class throws the following warning:

Warning: socket_read() [function.socket-read]: unable to read from socket [0]: Une connexion existante a dû être fermée par l'hôte distant.

As well as a RuntimeException with the following message: "unable to kill the process".

Removing the following line from the abstract Server class actually fixes the issue.

$this->doEvalJS($this->getConnection(), 'process.exit(0);');

Seems to me that Node's runtime is actually faster than PHP, and for that reason, the node server actually closes the connection when running the server's stop() method. This means that the connection as well as the process are closed:

  • The socket is being read / closed. Which throws the initial warning
  • The process is actually killed. Which throws the error with the Process component.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions