From 2781a2075118b841132599ce606fa048382e2844 Mon Sep 17 00:00:00 2001 From: Aaron Piotrowski Date: Fri, 5 Jun 2020 09:48:15 -0500 Subject: [PATCH] Use custom message with TimeoutCancellationToken --- src/TimeoutConnector.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TimeoutConnector.php b/src/TimeoutConnector.php index d0adfe6..5874f59 100644 --- a/src/TimeoutConnector.php +++ b/src/TimeoutConnector.php @@ -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);