Separate the window sentence from the wrapped error so a bad certificate file is not reported as a key mismatch.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+9
-1
@@ -93,6 +93,10 @@ func (s *Station) noteDownLocked(now time.Time, dial bool) {
|
||||
}
|
||||
|
||||
func (s *Station) endFatal(msg string, log bool) {
|
||||
s.endFatalCause(msg, nil, log)
|
||||
}
|
||||
|
||||
func (s *Station) endFatalCause(msg string, cause error, log bool) {
|
||||
s.mu.Lock()
|
||||
defer s.mu.Unlock()
|
||||
if s.fatal != "" {
|
||||
@@ -107,7 +111,11 @@ func (s *Station) endFatal(msg string, log bool) {
|
||||
if log {
|
||||
s.up = false
|
||||
s.outage = true
|
||||
s.writeLog(now, oneLine(msg))
|
||||
line := oneLine(msg)
|
||||
if cause != nil {
|
||||
line += ": " + oneLine(cause.Error())
|
||||
}
|
||||
s.writeLog(now, line)
|
||||
}
|
||||
s.publish()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user