Skip to content

TransportException: connection to server 'myServer.com:10011' lost #204

@MatthiasHeinz

Description

@MatthiasHeinz

When calling

$tsServer = // some object containing the server config
$options = array("host" => $tsServer->getHost(), "port" => $tsServer->getQueryPort(), "timeout" => 10, "blocking" => true);
$object = new ServerQuery($options);

the ServerQuery::__destruct() and thus this->request("quit") is being called (c.f. https://github.com/planetteamspeak/ts3phpframework/blob/dev/src/Adapter/ServerQuery.php#L106).

This line used to catch Exception instead of AdapterException (c.f.

) which used to catch the TransportException thrown in readLine(...) (c.f. https://github.com/planetteamspeak/ts3phpframework/blob/dev/src/Transport/TCP.php#L162), when calling this->request("quit").

For that reason, the TransportException is thrown and not caught anymore.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugConfirmed as a valid bug and requires fix.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions