fix import db and always restart xray

This commit is contained in:
Hamidreza Ghavami
2023-05-06 02:22:38 +04:30
parent b125f1835c
commit 9d1aa0d45f
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 {