diff --git a/xray/process.go b/xray/process.go index 60c53320..42b2ee5c 100644 --- a/xray/process.go +++ b/xray/process.go @@ -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) }