aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS_TheReturn/SaveSystem.cs
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-06-11 07:41:07 -0400
committerMichael <[email protected]>2017-06-11 07:41:07 -0400
commit0d75f701778a0900a58343c4c80c124279bc231f (patch)
tree9715201319348184e2c10f5da9b3d6becb4c2bb7 /ShiftOS_TheReturn/SaveSystem.cs
parentc3deaa23fffb7011efb2b5b0f7fc3e754d21f600 (diff)
downloadshiftos_thereturn-0d75f701778a0900a58343c4c80c124279bc231f.tar.gz
shiftos_thereturn-0d75f701778a0900a58343c4c80c124279bc231f.tar.bz2
shiftos_thereturn-0d75f701778a0900a58343c4c80c124279bc231f.zip
skip server connection if server is offline
Diffstat (limited to 'ShiftOS_TheReturn/SaveSystem.cs')
-rw-r--r--ShiftOS_TheReturn/SaveSystem.cs25
1 files changed, 16 insertions, 9 deletions
diff --git a/ShiftOS_TheReturn/SaveSystem.cs b/ShiftOS_TheReturn/SaveSystem.cs
index 18f8f78..b9bef47 100644
--- a/ShiftOS_TheReturn/SaveSystem.cs
+++ b/ShiftOS_TheReturn/SaveSystem.cs
@@ -163,22 +163,29 @@ namespace ShiftOS.Engine
bool guidReceived = false;
ServerManager.GUIDReceived += (str) =>
{
- //Connection successful! Stop waiting!
- guidReceived = true;
+ //Connection successful! Stop waiting!
+ guidReceived = true;
Console.WriteLine("[inetd] Connection successful.");
};
try
{
-
- ServerManager.Initiate(UserConfig.Get().DigitalSocietyAddress, UserConfig.Get().DigitalSocietyPort);
- //This haults the client until the connection is successful.
- while (ServerManager.thisGuid == new Guid())
+ if (ServerManager.ServerOnline)
{
- Thread.Sleep(10);
+ ServerManager.Initiate(UserConfig.Get().DigitalSocietyAddress, UserConfig.Get().DigitalSocietyPort);
+ //This haults the client until the connection is successful.
+ while (ServerManager.thisGuid == new Guid())
+ {
+ Thread.Sleep(10);
+ }
+ Console.WriteLine("[inetd] DHCP GUID recieved, finished setup");
+ FinishBootstrap();
+ }
+ else
+ {
+ Console.WriteLine("[inetd] No suitable network interface card found, skipping network connection.");
+ FinishBootstrap();
}
- Console.WriteLine("[inetd] DHCP GUID recieved, finished setup");
- FinishBootstrap();
}
catch (Exception ex)
{