Skip to content

fix: add IsActive checks to Writer methods to prevent panic after Close#416

Merged
xiaost merged 1 commit intomainfrom
fix/conn-writer-panic
Mar 5, 2026
Merged

fix: add IsActive checks to Writer methods to prevent panic after Close#416
xiaost merged 1 commit intomainfrom
fix/conn-writer-panic

Conversation

@xiaost
Copy link
Contributor

@xiaost xiaost commented Mar 5, 2026

Writer methods (Malloc, MallocAck, WriteBinary, WriteString, WriteByte, WriteDirect, Append) panicked with nil pointer dereference when called after connection Close, because closeBuffer sets outputBuffer pointers to nil. Only Flush and Write had IsActive guards.

Fixes #412

Writer methods (Malloc, MallocAck, WriteBinary, WriteString, WriteByte,
WriteDirect, Append) panicked with nil pointer dereference when called
after connection Close, because closeBuffer sets outputBuffer pointers
to nil. Only Flush and Write had IsActive guards.

Fixes #412
@xiaost xiaost requested review from a team as code owners March 5, 2026 08:57
@xiaost xiaost merged commit bd031f0 into main Mar 5, 2026
19 checks passed
@xiaost xiaost deleted the fix/conn-writer-panic branch March 5, 2026 09:12
@daimashusheng
Copy link

When will a version with this fix be released?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

intermittent panic in ShardQueue

3 participants