report an unexpected Telnet send failure instead of dropping the client - #331
Merged
Merged
Conversation
#331 SocketHandler.Send read every non-fatal exception as a hung up connection, so a defect in what we write cost every client in turn. That is how f013 became a mass disconnect. * Only SocketException, IOException and ObjectDisposedException disconnect. Anything else is raised after the loop and reported by BackgroundSender. * SocketHandler is protected, so a subclass calling Send sees exceptions it did not before.
Five tests provoked log4net:ERROR or WARN on purpose and let it reach stderr. * AdoNetAppenderTest twice, XmlConfiguratorTest, LogLogTest and StringFormatTest once each. * Ten messages down to two. The two left are LogLogTest.EmitInternalMessages, which asserts the console output itself.
fluffynuts
approved these changes
Sep 28, 2026
This was referenced Oct 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every throw from a Telnet write was read as a dead client, so a bug in what we write dropped every
client, one per event. That was f013.
Only
SocketException,IOExceptionandObjectDisposedExceptiondisconnect now. The rest isrethrown after the loop and reported by
BackgroundSender.Commit 2, test-only:
AdoNetAppenderTesttwice,XmlConfiguratorTest,LogLogTest,StringFormatTestonce eachlog4net:ERRORoff stderr, two left, asserted byLogLogTestCLAUDE.mdgets theReflectionExtensionsconvention from one home for the reflection in the tests #326