Skip to content

v2.3.1 - Fix memory auto-save persistence

Latest

Choose a tag to compare

@tkmawarire tkmawarire released this 25 Feb 01:26

Bug Fix

Fixed memory auto-save not persisting captures after get_events, get_stats, stream_events, and health_check calls.

Root cause

  • MemoryService.StartAsync catch block did not set _disabled = true on failure, so subsequent saves attempted file I/O to non-existent directories and silently failed
  • All fire-and-forget memory save paths swallowed exceptions with empty catch {} blocks, making failures invisible

Changes

  • Set _disabled = true in StartAsync catch block so failed startup correctly disables the service
  • Added Directory.CreateDirectory guard in SaveCaptureAsync for defense-in-depth
  • Replaced silent catch {} with logged warnings in all 4 fire-and-forget memory save paths (GetEvents, GetStats, StreamEvents, HealthCheck)

Full Changelog: v2.3.0...v2.3.1