Add Connection Error call for client not connected

This commit is contained in:
2021-07-28 08:30:50 -05:00
parent e7f60ba782
commit effd9d3f92
+3 -2
View File
@@ -78,7 +78,7 @@ namespace QControlKit
client.CueUpdated += OnCueUpdated; client.CueUpdated += OnCueUpdated;
this.server = server; this.server = server;
Log.Debug($"[workspace] <{name}> on {server.name} initialized."); Log.Debug($"[workspace] <{name}> on <{server.name}> initialized.");
} }
//updateWithDictionary //updateWithDictionary
@@ -179,6 +179,7 @@ namespace QControlKit
if (!client.connect()) if (!client.connect())
{ {
Log.Error($"[workspace] *** couldn't connect to server client is not connected."); Log.Error($"[workspace] *** couldn't connect to server client is not connected.");
OnWorkspaceConnectionError(this, new QWorkspaceConnectionErrorArgs { status = "unreachable" });
return; return;
} }
@@ -427,7 +428,7 @@ namespace QControlKit
} }
else else
{ {
Log.Error($"[workspace] *** Unable to connect to workspace: {name} on server: {server.name}"); Log.Error($"[workspace] *** Unable to connect to workspace: <{name}> on server: <{server.name}>");
} }
WorkspaceConnectionError?.Invoke(this, new QWorkspaceConnectionErrorArgs { status = args.status }); WorkspaceConnectionError?.Invoke(this, new QWorkspaceConnectionErrorArgs { status = args.status });