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/log_writer.go2
-rw-r--r--xray/process.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/xray/log_writer.go b/xray/log_writer.go
index 2c22166d..b6e04db7 100644
--- a/xray/log_writer.go
+++ b/xray/log_writer.go
@@ -25,7 +25,7 @@ func (lw *LogWriter) Write(m []byte) (n int, err error) {
if crashRegex.MatchString(message) {
logger.Debug("Core crash detected:\n", message)
lw.lastLine = message
- err1 := writeCrachReport(m)
+ err1 := writeCrashReport(m)
if err1 != nil {
logger.Error("Unable to write crash report:", err1)
}
diff --git a/xray/process.go b/xray/process.go
index 077ff339..335ad9c1 100644
--- a/xray/process.go
+++ b/xray/process.go
@@ -242,7 +242,7 @@ func (p *process) Stop() error {
return p.cmd.Process.Signal(syscall.SIGTERM)
}
-func writeCrachReport(m []byte) error {
+func writeCrashReport(m []byte) error {
crashReportPath := config.GetBinFolderPath() + "/core_crash_" + time.Now().Format("20060102_150405") + ".log"
return os.WriteFile(crashReportPath, m, os.ModePerm)
}