aboutsummaryrefslogtreecommitdiff
path: root/source/WindowsFormsApplication1/Program.cs
diff options
context:
space:
mode:
authorMichaelTheShifter <[email protected]>2016-05-17 15:37:02 -0400
committerMichaelTheShifter <[email protected]>2016-05-17 15:37:02 -0400
commita3fc2c45ec2a62684e128ffd7cab88bd101ad917 (patch)
tree1dc63efaa4597a28fd901047a714f38954dafa5e /source/WindowsFormsApplication1/Program.cs
parent0085241d2366f266b5416488dbead174184420b0 (diff)
downloadshiftos-c-_theultimatehacker-a3fc2c45ec2a62684e128ffd7cab88bd101ad917.tar.gz
shiftos-c-_theultimatehacker-a3fc2c45ec2a62684e128ffd7cab88bd101ad917.tar.bz2
shiftos-c-_theultimatehacker-a3fc2c45ec2a62684e128ffd7cab88bd101ad917.zip
Committing all I've got
Committing everything I've got - so that I can take a break for a few months and work on other things.
Diffstat (limited to 'source/WindowsFormsApplication1/Program.cs')
-rw-r--r--source/WindowsFormsApplication1/Program.cs31
1 files changed, 19 insertions, 12 deletions
diff --git a/source/WindowsFormsApplication1/Program.cs b/source/WindowsFormsApplication1/Program.cs
index e7fb173..668b08e 100644
--- a/source/WindowsFormsApplication1/Program.cs
+++ b/source/WindowsFormsApplication1/Program.cs
@@ -24,23 +24,30 @@ namespace ShiftOS
//Extract all dependencies before starting the engine.
ExtractDependencies();
var poolThread = new Thread(new ThreadStart(new Action(() => {
- //Download ShiftOS server startup-pool
- string pool = new WebClient().DownloadString("http://playshiftos.ml/server/startup_pool");
- string[] splitter = pool.Split(';');
- foreach(string address in splitter)
+ try
{
- try
- {
- string[] addSplitter = address.Split(':');
- string host = addSplitter[0];
- int port = Convert.ToInt32(addSplitter[1]);
- Package_Grabber.ConnectToServer(host, port);
- }
- catch
+ //Download ShiftOS server startup-pool
+ string pool = new WebClient().DownloadString("http://playshiftos.ml/server/startup_pool");
+ string[] splitter = pool.Split(';');
+ foreach (string address in splitter)
{
+ try
+ {
+ string[] addSplitter = address.Split(':');
+ string host = addSplitter[0];
+ int port = Convert.ToInt32(addSplitter[1]);
+ Package_Grabber.ConnectToServer(host, port);
+ }
+ catch
+ {
+ }
}
}
+ catch(Exception ex)
+ {
+ Console.WriteLine("[ServerThread/WARNING] Couldn't retrieve startup pool. Not connecting to any servers.");
+ }
})));
poolThread.Start();
//Start the Windows Forms backend