Use a timer to try reconnecting to the XMPP server only each 2 seconds
When the connection is lost, immediately try to reconnect, then try to reconnect every 2 seconds. This is much better than the previous “Try to re-connect as fast as possible”.
This commit is contained in:
@@ -241,6 +241,12 @@ public:
|
||||
* Whether or not we ever succeeded our authentication to the XMPP server
|
||||
*/
|
||||
bool ever_auth;
|
||||
/**
|
||||
* Whether or not this is the first consecutive try on connecting to the
|
||||
* XMPP server. We use this to delay the connection attempt for a few
|
||||
* seconds, if it is not the first try.
|
||||
*/
|
||||
bool first_connection_try;
|
||||
|
||||
private:
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user