X-Git-Url: http://git.ithinksw.org/MenuTunes.git/blobdiff_plain/2404965b693451fd71dcffd06eb82695e9085389..aeae287077a886690921baaea0a0f1149bc891db:/NetworkController.m diff --git a/NetworkController.m b/NetworkController.m index 49b8321..d5c8465 100755 --- a/NetworkController.m +++ b/NetworkController.m @@ -110,9 +110,9 @@ static NetworkController *sharedController; } else if (serverOn && !status && [serverConnection isValid]) { //Turn off [service stop]; + [clientProxy invalidate]; [serverConnection registerName:nil]; [serverConnection release]; - [clientProxy release]; ITDebugLog(@"Stopped server."); serverOn = NO; } @@ -200,6 +200,7 @@ static NetworkController *sharedController; NSConnection *testConnection; NSSocketPort *testPort; NetworkObject *tempProxy; + BOOL valid; ITDebugLog(@"Checking for shared remote at %@.", host); if (fullPass) { [fullPass getBytes:&buffer range:NSMakeRange(6, 4)]; @@ -216,6 +217,7 @@ static NetworkController *sharedController; [testConnection setReplyTimeout:2]; tempProxy = (NetworkObject *)[testConnection rootProxy]; [tempProxy serverName]; + valid = [tempProxy isValid]; NS_HANDLER ITDebugLog(@"Connection to host failed: %@", host); [testConnection release]; @@ -231,7 +233,7 @@ static NetworkController *sharedController; } [testConnection release]; [testPort release]; - return YES; + return valid; } - (BOOL)isServerOn