mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-17 02:51:45 -05:00
binding queue should not throw excpetion if fails to connect (#542)
This commit is contained in:
@@ -316,6 +316,7 @@ namespace Microsoft.SqlTools.ServiceLayer.DisasterRecovery.RestoreOperation
|
|||||||
}
|
}
|
||||||
catch(Exception ex)
|
catch(Exception ex)
|
||||||
{
|
{
|
||||||
|
Logger.Write(LogLevel.Normal, $"Failed to execute restore task. error: {ex.Message}");
|
||||||
throw ex;
|
throw ex;
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
|
|||||||
@@ -124,9 +124,16 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageServices
|
|||||||
foreach (var bindingContext in contexts)
|
foreach (var bindingContext in contexts)
|
||||||
{
|
{
|
||||||
if (bindingContext.BindingLock.WaitOne(millisecondsTimeout))
|
if (bindingContext.BindingLock.WaitOne(millisecondsTimeout))
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
bindingContext.ServerConnection.Connect();
|
bindingContext.ServerConnection.Connect();
|
||||||
}
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
//TODO: remove the binding context?
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user