+ //If we've already tried to handshake three times in a row unsuccessfully, set the attempt count to -3
+ if (_handshakeAttempts > 3) {
+ ITDebugLog(@"Audioscrobbler: Maximum handshake limit reached (3). Retrying when handshake attempts reach zero.");
+ _handshakeAttempts = -3;
+
+ //Remove any tracks we were trying to submit, just to be safe
+ [_submitTracks removeAllObjects];
+
+ return;
+ }
+
+ //Increment the number of times we've tried to handshake
+ _handshakeAttempts++;
+
+ //We're still on our self-imposed cooldown time.
+ if (_handshakeAttempts < 0) {
+ ITDebugLog(@"Audioscrobbler: Handshake timeout. Retrying when handshake attempts reach zero.");
+ return;
+ }
+