mirror of
https://github.com/drakkan/sftpgo.git
synced 2024-11-25 00:50:31 +00:00
mysql data provider: add read and write timeout
This should hopefully fix #47
This commit is contained in:
parent
6b33d3d9f1
commit
bf00ca334d
1 changed files with 1 additions and 1 deletions
|
@ -19,7 +19,7 @@ func initializeMySQLProvider() error {
|
|||
var connectionString string
|
||||
logSender = MySQLDataProviderName
|
||||
if len(config.ConnectionString) == 0 {
|
||||
connectionString = fmt.Sprintf("%v:%v@tcp([%v]:%v)/%v?charset=utf8&interpolateParams=true&timeout=10s&tls=%v",
|
||||
connectionString = fmt.Sprintf("%v:%v@tcp([%v]:%v)/%v?charset=utf8&interpolateParams=true&timeout=10s&tls=%v&writeTimeout=10s&readTimeout=10s",
|
||||
config.Username, config.Password, config.Host, config.Port, config.Name, getSSLMode())
|
||||
} else {
|
||||
connectionString = config.ConnectionString
|
||||
|
|
Loading…
Reference in a new issue