- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 838
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
NetworkStream ReadAsync throws ObjectDisposedException #1327
Labels
bug
Something isn't working
Comments
Looks like the same issue applies in the |
Thanks for reporting this! |
Elanis
pushed a commit
to Elanis/portfolio
that referenced
this issue
Dec 13, 2022
Bumps [MailKit](https://github.com/jstedfast/MailKit) from 3.1.1 to 3.2.0. <details> <summary>Changelog</summary> *Sourced from [MailKit's changelog](https://github.com/jstedfast/MailKit/blob/master/ReleaseNotes.md).* > ### MailKit 3.2.0 (2022-03-26) > > * Do not use ApplicationProtocols with SSL. (issue [#1352](jstedfast/MailKit#1352)) > * Updated GMail, Yahoo, and Outlook.com certificates. > * Lazy-initialize MessageSummary.Keywords. This reduces memory usage when the client isn't requesting Flags/Keywords. > * Hard-cache some IMAP FETCH-related tokens in order to relieve GC pressure for commands like FETCH where there can > be a LOT of responses containing the same tokens over and over again. > * Converted some IMAP async Task methods to use ValueTask to reduce GC pressure. > * Reduced string allocations in the IMAP logic by avoiding use of ToUpperInvariant(). > * Added non-async implementations for ImapStream APIs to be used by the synchronous public APIs to avoid some async overhead. > * Reduce MemoryStream (and thus byte[]) allocations by using a new ByteArrayBuilder. > * Rewrote the IMAP CAPABILITY parser to avoid allocating strings. > * Fixed some cases where IMAP NIL tokens were not compared case insensitively. > * Always include the VERSION block in NTLM messages. (issue [#1340](jstedfast/MailKit#1340)) > * Target .NET Framework v4.6.1 instead of v4.6 to match the changes in MimeKit. > * Capture the Socket timeout value in Read/WriteAsync() to have it in case of exceptions. > (issue [#1327](jstedfast/MailKit#1327)) </details> <details> <summary>Commits</summary> - [`77eb925`](jstedfast/MailKit@77eb925) Bumped version to 3.2.0 - [`1af5110`](jstedfast/MailKit@1af5110) Do not use ApplicationProtocols with SSL - [`73c6f67`](jstedfast/MailKit@73c6f67) Updated GMail and Yahoo certificates - [`c3a48ac`](jstedfast/MailKit@c3a48ac) Bump nunit from 3.13.2 to 3.13.3 ([#1350](jstedfast/MailKit#1350)) - [`a736d88`](jstedfast/MailKit@a736d88) Lazy-initialize MessageSummary.Keywords - [`ab1e087`](jstedfast/MailKit@ab1e087) Use token.Value.ToString() in case the token is a char token - [`16adde1`](jstedfast/MailKit@16adde1) Updated GMail certificates - [`d284a2d`](jstedfast/MailKit@d284a2d) Hard-cache some IMAP FETCH-related tokens - [`cfe6dba`](jstedfast/MailKit@cfe6dba) Always include the VERSION block in NTLM messages. - [`cfa66e4`](jstedfast/MailKit@cfa66e4) Convert more async IMAP methods to ValueTask - Additional commits viewable in [compare view](jstedfast/MailKit@3.1.1...3.2.0) </details> <br /> Reviewed-on: https://gitea.dysnomia.studio/elanis/portfolio/pulls/31 Co-authored-by: elanis <[email protected]> Co-committed-by: elanis <[email protected]>
Elanis
added a commit
to Dysnomia-Studio/dysnomia-website
that referenced
this issue
Jul 14, 2023
Bumps [MailKit](https://github.com/jstedfast/MailKit) from 3.1.1 to 3.2.0. <details> <summary>Changelog</summary> *Sourced from [MailKit's changelog](https://github.com/jstedfast/MailKit/blob/master/ReleaseNotes.md).* > ### MailKit 3.2.0 (2022-03-26) > > * Do not use ApplicationProtocols with SSL. (issue [#1352](jstedfast/MailKit#1352)) > * Updated GMail, Yahoo, and Outlook.com certificates. > * Lazy-initialize MessageSummary.Keywords. This reduces memory usage when the client isn't requesting Flags/Keywords. > * Hard-cache some IMAP FETCH-related tokens in order to relieve GC pressure for commands like FETCH where there can > be a LOT of responses containing the same tokens over and over again. > * Converted some IMAP async Task methods to use ValueTask to reduce GC pressure. > * Reduced string allocations in the IMAP logic by avoiding use of ToUpperInvariant(). > * Added non-async implementations for ImapStream APIs to be used by the synchronous public APIs to avoid some async overhead. > * Reduce MemoryStream (and thus byte[]) allocations by using a new ByteArrayBuilder. > * Rewrote the IMAP CAPABILITY parser to avoid allocating strings. > * Fixed some cases where IMAP NIL tokens were not compared case insensitively. > * Always include the VERSION block in NTLM messages. (issue [#1340](jstedfast/MailKit#1340)) > * Target .NET Framework v4.6.1 instead of v4.6 to match the changes in MimeKit. > * Capture the Socket timeout value in Read/WriteAsync() to have it in case of exceptions. > (issue [#1327](jstedfast/MailKit#1327)) </details> <details> <summary>Commits</summary> - [`77eb925`](jstedfast/MailKit@77eb925) Bumped version to 3.2.0 - [`1af5110`](jstedfast/MailKit@1af5110) Do not use ApplicationProtocols with SSL - [`73c6f67`](jstedfast/MailKit@73c6f67) Updated GMail and Yahoo certificates - [`c3a48ac`](jstedfast/MailKit@c3a48ac) Bump nunit from 3.13.2 to 3.13.3 ([#1350](jstedfast/MailKit#1350)) - [`a736d88`](jstedfast/MailKit@a736d88) Lazy-initialize MessageSummary.Keywords - [`ab1e087`](jstedfast/MailKit@ab1e087) Use token.Value.ToString() in case the token is a char token - [`16adde1`](jstedfast/MailKit@16adde1) Updated GMail certificates - [`d284a2d`](jstedfast/MailKit@d284a2d) Hard-cache some IMAP FETCH-related tokens - [`cfe6dba`](jstedfast/MailKit@cfe6dba) Always include the VERSION block in NTLM messages. - [`cfa66e4`](jstedfast/MailKit@cfa66e4) Convert more async IMAP methods to ValueTask - Additional commits viewable in [compare view](jstedfast/MailKit@3.1.1...3.2.0) </details> <br /> Co-authored-by: Elanis <[email protected]> Reviewed-on: https://gitea.dysnomia.studio/elanis/dysnomia-website/pulls/35 Co-authored-by: elanis <[email protected]> Co-committed-by: elanis <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When a read timeout occurs in the
NetworkStream.ReadAsync
it will Disconnect the Socket. But in the Exception message it will use theReadTimeout
property, which reads theSocket.ReceiveTimeout
property. This will throw anObjectDisposedException
because it was just disposed by callingDisconnect();
in the line before.Suggested fix is to store the
ReadTimeout
in a local variable and use that in the exception message.Platform (please complete the following information):
Exception
The text was updated successfully, but these errors were encountered: