From aeae287077a886690921baaea0a0f1149bc891db Mon Sep 17 00:00:00 2001 From: Kent Sutherland Date: Fri, 5 Dec 2003 00:29:57 +0000 Subject: [PATCH] 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. --- MainController.m | 3 +-- NetworkController.m | 1 + libValidate.a | Bin 8032 -> 8032 bytes 3 files changed, 2 insertions(+), 2 deletions(-) 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 71a8a250e80170183408479a1e238eaa9395af3a..d2afe42dba87a291d8bd485eaa0dbbc5a30c4e42 100755 GIT binary patch delta 15 WcmaE0_rPv~9E*v8k-