diff options
author | Frédéric Guillot <fred@kanboard.net> | 2018-02-14 10:18:27 -0800 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2018-02-14 10:18:27 -0800 |
commit | 0d578171feed5e09afc258346c183cf905333f4a (patch) | |
tree | 89e812512d4d6aa2e310538c9a2be8a030692176 /vendor/fguillot/picodb/lib/PicoDb/Driver/Mysql.php | |
parent | b096e907cf003659cf1b504787363352191fc639 (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.php | 4 |
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']; } |