send empty response for non-ms sql peekdef calls (#480)

This commit is contained in:
Praveen Barli
2017-10-06 15:32:11 -07:00
committed by GitHub
parent 2c4f2cf6b8
commit 8b86279c3d

View File

@@ -381,7 +381,7 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageServices
{
if (definitionResult.IsErrorResult)
{
await requestContext.SendError(definitionResult.Message);
await requestContext.SendError(definitionResult.Message);
}
else
{
@@ -391,12 +391,17 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageServices
}
else
{
// Send an empty result so that processing does not hang
// Send an empty result so that processing does not hang when peek def service called from non-mssql clients
await requestContext.SendResult(Array.Empty<Location>());
}
DocumentStatusHelper.SendTelemetryEvent(requestContext, CreatePeekTelemetryProps(succeeded, isConnected));
}
else
{
// Send an empty result so that processing does not hang
await requestContext.SendResult(Array.Empty<Location>());
}
DocumentStatusHelper.SendStatusChange(requestContext, textDocumentPosition, DocumentStatusHelper.DefinitionRequestCompleted);
}