Files
cc-connect/daemon
kevinWangSheng f108656e91 fix(daemon): prevent nil pointer panic in RotatingWriter after failed rotation
When rotate() fails to open the new log file, the original code set
w.file to nil (via the failed retry that returned nil). Subsequent
Write() calls would dereference w.file and panic.

Fix:
- Add nil check in Write() to return os.ErrClosed gracefully
- Remove the useless retry in rotate() (identical call would also fail)
- Explicitly set w.file = nil on failure so the nil guard in Write() and
  Close() handles it correctly
2026-03-13 11:03:01 -07:00
..