Selaa lähdekoodia

fix writeCrashReport() typo (#3218)

Danilo Nascimento 18 tuntia sitten
vanhempi
commit
011e0f309a
2 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 1 1
      xray/log_writer.go
  2. 1 1
      xray/process.go

+ 1 - 1
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)
 		}

+ 1 - 1
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)
 }