-
Notifications
You must be signed in to change notification settings - Fork 89
Handel Unobserved Exceptions During Connection State Transitions #999
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
Conversation
scottf
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
| return source.ToArray().Should(); | ||
| } | ||
|
|
||
| public static GenericCollectionAssertions<T> Should<T>(this ReadOnlySpan<T> source) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This overload was causing stack overflow in tests. and since it wasn't really used by anything I removed them to fix the issue.
The reason for this starting to happen was the release of C# 14 last week where the span overload resolution changed and since we're using the latest language by default and github ubuntu-lates now includes .net 10, and in our global.json we roll to latest major, we end up using the newest stable compiler.
|
hi @DieterSedlmayer are you able to verify this fixes the issue for you? thanks |
|
LGTM. Waiting for new NuGet release for re-testing. |
thanks, will merge.
Good point. we can add another option for that. wdyt? |
* Add prioritized mode (#1011) * Add Publish Timeout on Disconnect (#1001) * Fix test flap (#1012) * Add test to promote mirrored to regular stream (#1008) * Add Nats-Expected-Last-Subject-Sequence-Subject (#1007) * Fix keyed NATS clients with configurations (#1006) * ensure NatsConnectionPool cannot overflow (#1005) * Fix stream config adjustments on update (#995) * Handel Unobserved Exceptions During Connection State Transitions (#999) * Added verification of the consumer sequence number for pull ordered consumers (#981) * Fix build warnings (#991) * Reduce closure allocations (#988)
* Add prioritized mode (#1011) * Add Publish Timeout on Disconnect (#1001) * Fix test flap (#1012) * Add test to promote mirrored to regular stream (#1008) * Add Nats-Expected-Last-Subject-Sequence-Subject (#1007) * Fix keyed NATS clients with configurations (#1006) * ensure NatsConnectionPool cannot overflow (#1005) * Fix stream config adjustments on update (#995) * Handel Unobserved Exceptions During Connection State Transitions (#999) * Added verification of the consumer sequence number for pull ordered consumers (#981) * Fix build warnings (#991) * Reduce closure allocations (#988)
Ensure unobserved exceptions are handled properly during connection state transitions.
This pull request introduces a small improvement to exception handling during the initial connection process in
NatsConnection.cs. The change ensures that unobserved exceptions from the connection task are suppressed, preventing potential issues with unhandled exceptions surfacing unexpectedly.Exception handling improvement:
InitialConnectAsync, after attempting to set an exception on_waitForOpenConnection, the code now explicitly accesses the task'sExceptionproperty to suppress unobserved exceptions, ensuring cleaner error handling during connection retries. [1] [2]