- NSLog(@"Remote exception thrown: %@: %@", [exception name], [exception reason]);
- 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 ([networkController isConnectedToServer] && [self disconnectFromServer]) {
- if ([[exception name] isEqualToString:NSPortTimeoutException]) {
+ NSLog(@"%@", [exception reason]);
+ if ([[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];