-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
IServiceBroker/MessagePack/OOP fix roll-up #48201
Conversation
This source is unnecessary since operations will fail anyway after a disconnection occurs.
This method was corrected for 16.8 Preview 3.
{ | ||
cancellationToken.ThrowIfCancellationRequested(); | ||
|
||
// If this is hit the cancellation token passed to the service implementation did not use the correct token. | ||
if (exception is ConnectionLostException) |
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 is probably worth documenting why we're doing it this way. doesn't need to be in this PR though.
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.
It's documented a few lines above, and still under investigation.
roslyn/src/Workspaces/Remote/Core/RemoteCallback.cs
Lines 103 to 112 in 4123b1c
// When a connection is dropped and CancelLocallyInvokedMethodsWhenConnectionIsClosed is | |
// set ConnectionLostException should not be thrown. Instead the cancellation token should be | |
// signaled and OperationCancelledException should be thrown. | |
// Seems to not work in all cases currently, so we need to cancel ourselves (bug https://github.com/microsoft/vs-streamjsonrpc/issues/551). | |
// Once this issue is fixed we can remov this if statement and fall back to reporting NFW | |
// as any observation of ConnectionLostException indicates a bug (e.g. https://github.com/microsoft/vs-streamjsonrpc/issues/549). | |
if (exception is ConnectionLostException) | |
{ | |
return true; | |
} |
|
||
// work around incorrect implementation in 16.8 Preview 2 | ||
if (MultiplexingStream == multiplexingStream) | ||
return this; |
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.
possibly to doc/explain/link this to something clearer?
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.
actually, doc the whole thing tbh, i don't undestand any of it :)
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.
See #47870 (comment). This is dead code by API contract and only needed because roslyn-integration-CI is on a specific version with a bug.
Pull request #48153 will revert this as soon as roslyn-integration-CI is updated to 16.8 Preview 3 or newer.
Supersedes #47870, #48179, #48187, #48188, #48195
Closes #48175