-
Notifications
You must be signed in to change notification settings - Fork 331
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ObjectDisposedException in TelnetAppender (3.0.1) #194
Comments
@VianneyTremelo thanks for reporting, I will take a look. |
Additional information: I'm using VS 2022 and my applications run with DotNet Framework 4.8 on Windows 10/11 |
@VianneyTremelo I've found a bug in the Dispose logic (see #195). |
@FreeAndNil : The ObjectDisposedException is now fixed. Thank you. Let me know when a new release with the fix will be available that I can double-check with my apps |
I tested my 2 applications with v3.0.2-preview --> In the both cases, It's works fine ! |
#194 fixed a bug in the Dispose-Logic of TelnetAppender
I migrated two (C#) applications to the version 3.01. And I've now an exception : "System.ObjectDisposedException: 'Cannot access a disposed object. Object name: 'System.Net.Sockets.Socket'.'" (see screenshot below)
The port that I use is not locked by another application, because if I rollback my changes and run my application with previous version of log4net (v2.0.1) => it's works fine.
My config:
Error:
(edit - added from https://stackoverflow.com/questions/79053363/log4net-telnetappender-doesnt-work-after-migrate-to-log4net-3)
https://github.com/apache/logging-log4net/blob/Feature/TelnetBug/src/log4net.Tests/Appender/TelnetAppenderTest.cs
I tried to run the UnitTest (TelnetAppenderTest) in Execution mode : OK, no error.
But when I try to run it in debug, I have the same issue (but at the end). When the test tries to dispose the Telnet Client, an error "Cannot access a disposed object" appears (see screenshot link below). It's the issue that I have.
https://snipboard.io/Dnb8Vj.jpg
I migrated two applications: both have the same issue - One at the end, when the application are being to be dispose - The 2nd have the issue at the startup.
The text was updated successfully, but these errors were encountered: