This commit is contained in:
hoteas
2017-10-30 08:23:42 +00:00
parent 3507d2ed74
commit cf8ba558ca
2 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ func (this *Application) Run(router Router) {
//this.Port = port
this.Port = this.Config.GetString("port")
if this.connectDbFunc != nil && this.Db.DB.Ping() != nil {
if this.connectDbFunc != nil && (this.Db.DB==nil||this.Db.DB.Ping() != nil) {
this.Db.SetConnect(this.connectDbFunc)
}