mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-23 22:40:39 +02:00
fix compilation
This commit is contained in:
1 parent
ae812c07d6
commit
fd1d8a2a09
1 file changed
+2
-1
@@ -3,6 +3,7 @@ package mysql
|
||||
import (
|
||||
"database/sql"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/filer"
|
||||
"github.com/chrislusf/seaweedfs/weed/filer/abstract_sql"
|
||||
@@ -66,7 +67,7 @@ func (store *MysqlStore) initialize(user, password, hostname string, port int, d
|
||||
|
||||
store.DB.SetMaxIdleConns(maxIdle)
|
||||
store.DB.SetMaxOpenConns(maxOpen)
|
||||
store.DB.SetConnMaxLifetime(maxLifetimeSeconds*time.Second)
|
||||
store.DB.SetConnMaxLifetime(time.Duration(maxLifetimeSeconds)*time.Second)
|
||||
|
||||
if err = store.DB.Ping(); err != nil {
|
||||
return fmt.Errorf("connect to %s error:%v", sqlUrl, err)
|
||||
|
||||
Reference in new issue
Block a user