Made it so that the stupid client DISCONNECTS, with the side effect of
authorKent Sutherland <ksuther@ithinksw.com>
Fri, 5 Dec 2003 00:29:57 +0000 (00:29 +0000)
committerKent Sutherland <ksuther@ithinksw.com>
Fri, 5 Dec 2003 00:29:57 +0000 (00:29 +0000)
the server CRASHING. AAAARGGGH. Gotta test it between two computers to
figure out how to fix it.

MainController.m
NetworkController.m
libValidate.a

index fbeae9d..3c1cb6c 100755 (executable)
@@ -1011,8 +1011,7 @@ static MainController *sharedController;
 - (void)networkError:(NSException *)exception
 {
     ITDebugLog(@"Remote exception thrown: %@: %@", [exception name], [exception reason]);
-    NSLog(@"%@", [exception reason]);
-    if ([[exception name] isEqualToString:NSPortTimeoutException] && [networkController isConnectedToServer]) {
+    if ( ((exception == nil) || [[exception name] isEqualToString:NSPortTimeoutException]) && [networkController isConnectedToServer]) {
         NSRunCriticalAlertPanel(@"Remote MenuTunes Disconnected", @"The MenuTunes server you were connected to stopped responding or quit. MenuTunes will revert back to the local player.", @"OK", nil, nil);
         if ([self disconnectFromServer]) {
             [[PreferencesController sharedPrefs] resetRemotePlayerTextFields];
index 1d180c6..d5c8465 100755 (executable)
@@ -110,6 +110,7 @@ static NetworkController *sharedController;
     } else if (serverOn && !status && [serverConnection isValid]) {
         //Turn off
         [service stop];
+        [clientProxy invalidate];
         [serverConnection registerName:nil];
         [serverConnection release];
         ITDebugLog(@"Stopped server.");
index 71a8a25..d2afe42 100755 (executable)
Binary files a/libValidate.a and b/libValidate.a differ