Log when agent fails to register, but take no further action.

This commit is contained in:
Jared Goodwin 2020-02-17 22:00:21 -08:00
parent d1864716cd
commit 8a4804f09f

View File

@ -62,7 +62,16 @@ namespace Remotely.Agent.Services
var device = await Device.Create(ConnectionInfo);
await HubConnection.InvokeAsync("DeviceCameOnline", device);
var result = await HubConnection.InvokeAsync<bool>("DeviceCameOnline", device);
if (!result)
{
// Orgnanization ID wasn't found, or this device is already connected.
// The above can be caused by temporary issues on the server. So we'll do
// nothing here and wait for it to get resolved.
Logger.Write("There was an issue registering with the server. The server might be undergoing maintenance, or the supplied organization ID might be incorrect.");
return;
}
if (string.IsNullOrWhiteSpace(ConnectionInfo.ServerVerificationToken))
{