Description
After Close() sets c.sessions = nil, any operation that tries to access the sessions map will access a nil map. While Go allows reading from a nil map, the pattern is fragile.
Severity
LOW - Fragile code pattern
Test Reference
Test: TestDbClient_SessionsMapNilAfterClose in pkg/db/db_client/db_client_test.go:388 (skipped)
Suggested Fix
All session access should check if the map is nil.
Related Code
- Multiple session access points in pkg/db/db_client/