mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-04-19 13:32:24 +00:00
gracefully shutdown xray-core
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
This commit is contained in:
parent
4cc755c883
commit
1328bb5aba
1 changed files with 2 additions and 1 deletions
|
@ -12,6 +12,7 @@ import (
|
|||
"runtime"
|
||||
"strings"
|
||||
"sync"
|
||||
"syscall"
|
||||
"x-ui/config"
|
||||
"x-ui/util/common"
|
||||
|
||||
|
@ -227,5 +228,5 @@ func (p *process) Stop() error {
|
|||
if !p.IsRunning() {
|
||||
return errors.New("xray is not running")
|
||||
}
|
||||
return p.cmd.Process.Kill()
|
||||
return p.cmd.Process.Signal(syscall.SIGTERM)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue