mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-03-01 01:20:49 +03:00
gracefully shutdown xray-core
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
This commit is contained in:
parent
4cc755c883
commit
1328bb5aba
@ -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 New Issue
Block a user