-
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
check remote host being available. #17835
Conversation
when host is shutting down it is possible GetRemoteHostClient return null even though host itself support remote hosting.
@CyrusNajmabadi can you take a look? |
fix #17768 |
@@ -76,7 +76,11 @@ private class RemoteUpdateEngine : ISymbolSearchUpdateEngine | |||
_sessionDoNotAccessDirectly = null; | |||
|
|||
_client = await _workspace.GetRemoteHostClientAsync(CancellationToken.None).ConfigureAwait(false); | |||
_client.ConnectionChanged += OnConnectionChanged; |
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.
are there other people that might observe that the client returned by GetRemoteHostClientAsync could be null?
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.
👍
But i'm worried about other people needing to check for this. Can we rename the method to TryGetRemoteHostClient? Making it clear that it may fail and that the caller needs to handle that.
sure |
…it clear that it can return null when remote host is not available. left GetRemotehostClientAsync there as Obsolete so that this doesnt break other team such as LUT. will remove it once other team moved to new bits.
tagging @KevinH-MS I renamed GetRemoteHostClientAsync to TryGetRemoteHostClientAsync |
retest windows_release_vs-integration_prtest please |
when host is shutting down it is possible GetRemoteHostClient return null even though host itself support remote hosting.