1
0
mirror of https://github.com/danog/postgres.git synced 2024-12-02 09:27:54 +01:00

Use custom message with TimeoutCancellationToken

This commit is contained in:
Aaron Piotrowski 2020-06-05 09:48:15 -05:00
parent 190b98be49
commit 2781a20751
No known key found for this signature in database
GPG Key ID: ADD1EF783EDE9EEB

View File

@ -36,7 +36,7 @@ final class TimeoutConnector implements Connector
throw new \TypeError(\sprintf("Must provide an instance of %s to Postgres connectors", ConnectionConfig::class));
}
$token = new TimeoutCancellationToken($this->timeout);
$token = new TimeoutCancellationToken($this->timeout, "Connecting to the Postgres database timed out");
if (\extension_loaded("pq")) {
return PqConnection::connect($connectionConfig, $token);