Skip to content
Snippets Groups Projects
Commit 98f78db9 authored by Aiden Andrews-McDermott's avatar Aiden Andrews-McDermott
Browse files

Updated config.go to remove the defaulting idle connection limit of 5 which is...

Updated config.go to remove the defaulting idle connection limit of 5 which is an issue for upstream https://github.com/go-sql-driver/mysql/issues/674
parent 789272a0
No related branches found
No related tags found
No related merge requests found
......@@ -308,6 +308,13 @@ func (s *MySQL) open(logger log.Logger) (*conn, error) {
return nil, err
}
if s.MaxIdleConns == 0 {
/*Override default behaviour to fix https://github.com/dexidp/dex/issues/1608*/
db.SetMaxIdleConns(0)
} else {
db.SetMaxIdleConns(s.MaxIdleConns)
}
err = db.Ping()
if err != nil {
if mysqlErr, ok := err.(*mysql.MySQLError); ok && mysqlErr.Number == mysqlErrUnknownSysVar {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment