From: Kent Sutherland Date: Fri, 5 Dec 2003 00:29:57 +0000 (+0000) Subject: Made it so that the stupid client DISCONNECTS, with the side effect of X-Git-Tag: v1.2~18 X-Git-Url: http://git.ithinksw.org/MenuTunes.git/commitdiff_plain/aeae287077a886690921baaea0a0f1149bc891db Made it so that the stupid client DISCONNECTS, with the side effect of the server CRASHING. AAAARGGGH. Gotta test it between two computers to figure out how to fix it. --- diff --git a/MainController.m b/MainController.m index fbeae9d..3c1cb6c 100755 --- a/MainController.m +++ b/MainController.m @@ -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]; diff --git a/NetworkController.m b/NetworkController.m index 1d180c6..d5c8465 100755 --- a/NetworkController.m +++ b/NetworkController.m @@ -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."); diff --git a/libValidate.a b/libValidate.a index 71a8a25..d2afe42 100755 Binary files a/libValidate.a and b/libValidate.a differ