mirror of
https://github.com/onepanelio/onepanel.git
synced 2025-10-07 22:50:53 +08:00
fix: close db connection when not in use.
This commit is contained in:
@@ -180,6 +180,10 @@ func UnaryInterceptor(kubeConfig *v1.Config, db *v1.DB, sysConfig v1.SystemConfi
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if err := defaultClient.DB.Close(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
md.Set("onepanel-auth-token", rawToken)
|
||||
|
||||
ctx, err = getClient(ctx, kubeConfig, db, sysConfig)
|
||||
|
Reference in New Issue
Block a user