fix: nil reference while trying to shut down DB in slave mode (#1416)

pull/1571/head
HFO4 2 years ago
parent 4e8ab75211
commit 435a03dd34

@ -42,7 +42,11 @@ func init() {
func main() {
// 关闭数据库连接
defer model.DB.Close()
defer func() {
if model.DB != nil {
model.DB.Close()
}
}()
if isEject {
// 开始导出内置静态资源文件

Loading…
Cancel
Save