mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-16 14:41:03 +00:00
fix
This commit is contained in:
parent
c497c0fb26
commit
8821eb0ae0
|
@ -1,7 +1,7 @@
|
||||||
# welsonjs
|
# welsonjs
|
||||||
|
|
||||||
[](https://app.fossa.com/projects/git%2Bgithub.com%2Fgnh1201%2Fwelsonjs?ref=badge_shield)
|
[](https://app.fossa.com/projects/git%2Bgithub.com%2Fgnh1201%2Fwelsonjs?ref=badge_shield)
|
||||||
[](https://zenodo.org/doi/10.5281/zenodo.11382384)
|
[](https://doi.org/10.5281/zenodo.11382384)
|
||||||
|
|
||||||
WelsonJS - Build a Windows app on the Windows built-in JavaScript engine.
|
WelsonJS - Build a Windows app on the Windows built-in JavaScript engine.
|
||||||
|
|
||||||
|
|
|
@ -23,17 +23,26 @@ namespace WelsonJS.Service
|
||||||
|
|
||||||
// Read the device ID on this computer
|
// Read the device ID on this computer
|
||||||
deviceId = GetSystemUUID();
|
deviceId = GetSystemUUID();
|
||||||
this.parent.Log($"Resolved the device ID: {deviceId}");
|
|
||||||
|
|
||||||
// Read configuration from settings.ini
|
// Read configuration from settings.ini
|
||||||
try
|
if (!String.IsNullOrEmpty(deviceId))
|
||||||
{
|
{
|
||||||
serverAddress = this.parent.GetSettingsFileHandler().Read("GRPC_HOST", "Service");
|
this.parent.Log($"Resolved the device ID: {deviceId}");
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
serverAddress = this.parent.GetSettingsFileHandler().Read("GRPC_HOST", "Service");
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
serverAddress = null;
|
||||||
|
this.parent.Log($"Failed to read the server address: {ex.Message}");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
else
|
||||||
{
|
{
|
||||||
serverAddress = null;
|
serverAddress = null;
|
||||||
this.parent.Log($"Failed to read the server address: {ex.Message}");
|
this.parent.Log($"Failed to resolve the device ID");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the GRPC channel
|
// Set the GRPC channel
|
||||||
|
@ -61,7 +70,7 @@ namespace WelsonJS.Service
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
parent.Log("Not Initializd GRPC channel");
|
parent.Log("Failed to initalize the GRPC channel");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -110,7 +119,7 @@ namespace WelsonJS.Service
|
||||||
parent.Log($"An error occurred while retrieving the system UUID: {ex.Message}");
|
parent.Log($"An error occurred while retrieving the system UUID: {ex.Message}");
|
||||||
}
|
}
|
||||||
|
|
||||||
return string.Empty;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user