Skip to content

fix(transport): don't warn on releases after a hard close - #376

Open
fridokus wants to merge 1 commit into
emiago:mainfrom
fridokus:hardclose-refcount
Open

fridokus wants to merge 1 commit into
emiago:mainfrom
fridokus:hardclose-refcount

Conversation

@fridokus

@fridokus fridokus commented Oct 5, 2026

Copy link
Copy Markdown

Close() zeroes the refcount while holders still have references, so each holder's later TryClose() logs "ref went negative" at WARN. This remembers the hard close and skips that warning. A release too many without Close() still warns.

The new test fails without the change. Under -race it also needs #375.

Close zeroes the reference count while holders still have references, so
each holder's later TryClose takes it negative and logs "ref went negative".
Remember the hard close and skip the warning then. A release too many
without Close still warns.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant