project_files/HedgewarsMobile/Classes/MainMenuViewController.m
changeset 4547 b70004a576a3
parent 4463 1fe77f2bc1d1
child 4752 d65705a67c4e
--- a/project_files/HedgewarsMobile/Classes/MainMenuViewController.m	Thu Dec 16 15:26:19 2010 -0500
+++ b/project_files/HedgewarsMobile/Classes/MainMenuViewController.m	Thu Dec 16 22:46:38 2010 +0100
@@ -27,6 +27,7 @@
 #import "SplitViewRootController.h"
 #import "AboutViewController.h"
 #import "SavedGamesViewController.h"
+#import "ServerSetup.h"
 
 @implementation MainMenuViewController
 @synthesize gameConfigViewController, settingsViewController, aboutViewController, savedGamesViewController;
@@ -124,6 +125,15 @@
         [userDefaults synchronize];
         [self createNecessaryFiles];
     }
+    
+    ServerSetup *setup = [[ServerSetup alloc] init];
+    if ([setup isNetworkReachable]) {
+        DLog(@"network is reachable");
+        [NSThread detachNewThreadSelector:@selector(serverProtocol)
+                                 toTarget:setup
+                               withObject:nil];
+    }
+    [setup release];
 }