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:
parent
190b98be49
commit
2781a20751
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user