diff options
author | Florent Le Coz <louiz@louiz.org> | 2015-02-21 06:39:20 +0100 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2015-02-21 06:45:11 +0100 |
commit | a50ca30e769a628f609f8cc0eedf5bc10b3f1b5a (patch) | |
tree | 9119399eefe68d086e80eeaa3fc35e673257cdc7 /src/xmpp/xmpp_component.hpp | |
parent | 3032dc3580e2d6c3fab57b587945fbb213271557 (diff) | |
download | biboumi-a50ca30e769a628f609f8cc0eedf5bc10b3f1b5a.tar.gz biboumi-a50ca30e769a628f609f8cc0eedf5bc10b3f1b5a.tar.bz2 biboumi-a50ca30e769a628f609f8cc0eedf5bc10b3f1b5a.tar.xz biboumi-a50ca30e769a628f609f8cc0eedf5bc10b3f1b5a.zip |
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”.
Diffstat (limited to 'src/xmpp/xmpp_component.hpp')
-rw-r--r-- | src/xmpp/xmpp_component.hpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/xmpp/xmpp_component.hpp b/src/xmpp/xmpp_component.hpp index 64b2ff7..951d5a3 100644 --- a/src/xmpp/xmpp_component.hpp +++ b/src/xmpp/xmpp_component.hpp @@ -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: /** |