Skip to content

fix(redis): guard disconnect against null check operator exceptions on uninitialized socket close - #660

Merged
ZhuchkaTriplesix merged 1 commit into
devfrom
issue/657-redis-safe-disconnect
Aug 30, 2026
Merged

fix(redis): guard disconnect against null check operator exceptions on uninitialized socket close#660
ZhuchkaTriplesix merged 1 commit into
devfrom
issue/657-redis-safe-disconnect

Conversation

@ZhuchkaTriplesix

Copy link
Copy Markdown
Member

Description

Resolves #657 by guarding RedisConnection.disconnect() against internal socket null-assertions:

  1. Idempotent & Safe Disconnect:

    • Guarded close() calls in RedisConnection.disconnect() and FakeRedisConnection.disconnect().
    • Prevents Null check operator used on a null value exceptions when closing uninitialized or already-closed Redis connections.
    • Added forceClose() method on RedisConnection.
  2. Testing:

    • Added unit test forceClose delegates to disconnect cleanly in test/core/database/redis_connection_test.dart.
    • Verified that all Redis unit tests pass cleanly with zero console warnings.

Closes #657

- Guard RedisConnection.disconnect() against uninitialized socket close exceptions
- Add forceClose() delegating cleanly to disconnect()
- Add unit tests for idempotent disconnect and forceClose

Closes #657
@github-actions github-actions Bot added bug Something isn't working error-handling Theme parser epic label: error-handling stability Theme parser epic label: stability labels Aug 30, 2026
@ZhuchkaTriplesix
ZhuchkaTriplesix merged commit e7cb534 into dev Aug 30, 2026
4 checks passed
@ZhuchkaTriplesix ZhuchkaTriplesix mentioned this pull request Aug 30, 2026
@ZhuchkaTriplesix
ZhuchkaTriplesix deleted the issue/657-redis-safe-disconnect branch August 30, 2026 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working error-handling Theme parser epic label: error-handling stability Theme parser epic label: stability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant