Skip to content

Conversation

NickCraver
Copy link
Collaborator

Occasionally we'd see chunkLength errors from StringWriter .ToString() calls after connecting. I think we've isolated this (via test stress runs) down to a write happening post-lock on the TextWriterLogger disposal. This lock in dispose ensures we're not trying to write to a writer we should have fully released at the end of a .Connect()/.ConnectAsync() call.

Occasionally we'd see `chunkLength` errors from `StringWriter` `.ToString()` calls after connecting. I think we've isolated this (via test stress runs) down to a write happening post-lock on the `TextWriterLogger` disposal. This lock in dispose ensures we're not trying to write to a writer we should have fully released at the end of a `.Connect()`/`.ConnectAsync()` call.
@NickCraver NickCraver merged commit 4a13caf into main Oct 30, 2023
@NickCraver NickCraver deleted the craver/logging-race branch October 30, 2023 14:47
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.

3 participants