diff options
| author | mhsanaei <ho3ein.sanaei@gmail.com> | 2024-12-04 01:07:24 +0300 |
|---|---|---|
| committer | mhsanaei <ho3ein.sanaei@gmail.com> | 2024-12-04 01:07:24 +0300 |
| commit | 4c4cc362b37f6c23ab3a79651d0c0e67cc70974d (patch) | |
| tree | 121d699b0877a011c28bfa2ed98c037f669cbe39 /xray/process.go | |
| parent | 4e0aca16c22be4d6feb842bca8dc94141c2db775 (diff) | |
fix crash report
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
Diffstat (limited to 'xray/process.go')
| -rw-r--r-- | xray/process.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/xray/process.go b/xray/process.go index 58d14a1f..b4947864 100644 --- a/xray/process.go +++ b/xray/process.go @@ -226,7 +226,6 @@ func (p *process) Start() (err error) { if err != nil { logger.Error("Failure in running xray-core:", err) p.exitErr = err - p.witeCrachReport(err) } }() @@ -243,7 +242,7 @@ func (p *process) Stop() error { return p.cmd.Process.Signal(syscall.SIGTERM) } -func (p *process) witeCrachReport(err error) error { +func writeCrachReport(m []byte) error { crashReportPath := config.GetBinFolderPath() + "/core_crash_" + time.Now().Format("20060102_150405") + ".log" - return os.WriteFile(crashReportPath, []byte(err.Error()), os.ModePerm) + return os.WriteFile(crashReportPath, m, os.ModePerm) } |
