summaryrefslogtreecommitdiff
path: root/vendor/fguillot/picodb/lib/PicoDb/Driver/Mysql.php
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2018-02-14 10:18:27 -0800
committerFrédéric Guillot <fred@kanboard.net>2018-02-14 10:18:27 -0800
commit0d578171feed5e09afc258346c183cf905333f4a (patch)
tree89e812512d4d6aa2e310538c9a2be8a030692176 /vendor/fguillot/picodb/lib/PicoDb/Driver/Mysql.php
parentb096e907cf003659cf1b504787363352191fc639 (diff)
Add timeout parameter for database connection
Diffstat (limited to 'vendor/fguillot/picodb/lib/PicoDb/Driver/Mysql.php')
-rw-r--r--vendor/fguillot/picodb/lib/PicoDb/Driver/Mysql.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/vendor/fguillot/picodb/lib/PicoDb/Driver/Mysql.php b/vendor/fguillot/picodb/lib/PicoDb/Driver/Mysql.php
index 147be816..17f44057 100644
--- a/vendor/fguillot/picodb/lib/PicoDb/Driver/Mysql.php
+++ b/vendor/fguillot/picodb/lib/PicoDb/Driver/Mysql.php
@@ -102,6 +102,10 @@ class Mysql extends Base
$options[PDO::ATTR_PERSISTENT] = $settings['persistent'];
}
+ if (! empty($settings['timeout'])) {
+ $options[PDO::ATTR_TIMEOUT] = $settings['timeout'];
+ }
+
if (isset($settings['verify_server_cert'])) {
$options[PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT] = $settings['verify_server_cert'];
}