fix import db and always restart xray

This commit is contained in:
Hamidreza Ghavami
2023-05-06 02:22:45 +04:30
parent 6602c55f3c
commit 6c087ceb1a
2 changed files with 10 additions and 18 deletions

View File

@@ -152,6 +152,8 @@ func (a *ServerController) importDB(c *gin.Context) {
return
}
defer file.Close()
// Always restart Xray before return
defer a.serverService.RestartXrayService()
// Import it
err = a.serverService.ImportDB(file)
if err != nil {