adium 5688:975b4f6e5729: When Twitter disconnects, don't try to ...
commits at adium.im
commits at adium.im
Sat Sep 7 22:03:40 UTC 2013
details: http://hg.adium.im/adium/rev/975b4f6e5729
revision: 5688:975b4f6e5729
branch: adium-1.5.8
author: Thijs Alkemade <me at thijsalkema.de>
date: Sun Sep 08 00:01:49 2013 +0200
When Twitter disconnects, don't try to reconnect unless 15 minutes have passed, instead of 5 seconds. If we exceed a rate limit, we would continue to do that.
Subject: adium 5689:785d5ffb92f6: Check for updates using a https URL, now that we can.
details: http://hg.adium.im/adium/rev/785d5ffb92f6
revision: 5689:785d5ffb92f6
branch: adium-1.5.8
author: Thijs Alkemade <me at thijsalkema.de>
date: Sun Sep 08 00:03:19 2013 +0200
Check for updates using a https URL, now that we can.
diffs (68 lines):
diff -r 6c2293048ca9 -r 785d5ffb92f6 Frameworks/Adium Framework/Source/AIAbstractAccount.h
--- a/Frameworks/Adium Framework/Source/AIAbstractAccount.h Tue Sep 03 10:23:40 2013 +0200
+++ b/Frameworks/Adium Framework/Source/AIAbstractAccount.h Sun Sep 08 00:03:19 2013 +0200
@@ -100,6 +100,7 @@
//FUS Disconnecting
- (void)autoReconnectAfterDelay:(NSTimeInterval)delay;
+- (double)minimumReconnectTime;
- (void)cancelAutoReconnect;
- (void)initFUSDisconnecting;
diff -r 6c2293048ca9 -r 785d5ffb92f6 Frameworks/Adium Framework/Source/AIAbstractAccount.m
--- a/Frameworks/Adium Framework/Source/AIAbstractAccount.m Tue Sep 03 10:23:40 2013 +0200
+++ b/Frameworks/Adium Framework/Source/AIAbstractAccount.m Sun Sep 08 00:03:19 2013 +0200
@@ -1332,6 +1332,11 @@
return _contactProperties;
}
+- (double)minimumReconnectTime
+{
+ return RECONNECT_MIN_TIME;
+}
+
/*!
* @brief Did disconnect
*/
@@ -1388,8 +1393,8 @@
double reconnectDelay = pow(RECONNECT_BASE_TIME, (double)reconnectAttemptsPerformed);
// Make sure we're not going too fast
- if (reconnectDelay < RECONNECT_MIN_TIME)
- reconnectDelay = RECONNECT_MIN_TIME;
+ if (reconnectDelay < [self minimumReconnectTime])
+ reconnectDelay = [self minimumReconnectTime];
// Or too slow
else if (reconnectDelay > RECONNECT_MAX_TIME)
reconnectDelay = RECONNECT_MAX_TIME;
diff -r 6c2293048ca9 -r 785d5ffb92f6 Plists/Info.plist
--- a/Plists/Info.plist Tue Sep 03 10:23:40 2013 +0200
+++ b/Plists/Info.plist Sun Sep 08 00:03:19 2013 +0200
@@ -489,7 +489,7 @@
<key>SUCheckAtStartup</key>
<true/>
<key>SUFeedURL</key>
- <string>http://www.adium.im/sparkle/update.php</string>
+ <string>https://www.adium.im/sparkle/update.php</string>
<key>SUPublicDSAKeyFile</key>
<string>dsa_pub.pem</string>
<key>SUScheduledCheckInterval</key>
diff -r 6c2293048ca9 -r 785d5ffb92f6 Plugins/Twitter Plugin/AITwitterAccount.m
--- a/Plugins/Twitter Plugin/AITwitterAccount.m Tue Sep 03 10:23:40 2013 +0200
+++ b/Plugins/Twitter Plugin/AITwitterAccount.m Sun Sep 08 00:03:19 2013 +0200
@@ -290,6 +290,15 @@
}
/*!
+ * @brief A disconnect on Twitter often means we broke some rate-limit, or the server is overloaded.
+ * Lets be polite and wait for 15 minutes.
+ */
+- (double)minimumReconnectTime
+{
+ return 15.0 * 60.0;
+}
+
+/*!
* @brief Session ended
*
* Remove all state information.
More information about the commits
mailing list