Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xray/process.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/xray/process.go b/xray/process.go
index 335ad9c1..21ca5223 100644
--- a/xray/process.go
+++ b/xray/process.go
@@ -239,7 +239,12 @@ func (p *process) Stop() error {
if !p.IsRunning() {
return errors.New("xray is not running")
}
- return p.cmd.Process.Signal(syscall.SIGTERM)
+
+ if runtime.GOOS == "windows" {
+ return p.cmd.Process.Kill()
+ } else {
+ return p.cmd.Process.Signal(syscall.SIGTERM)
+ }
}
func writeCrashReport(m []byte) error {