Introduce two new bool, to know if the xmpp component should try to reconnect

If we never succeeded our connection+auth process, means we should probably
not attempt any-more, and just give up.  If we ever did, this means a
reconnect is a good idea
This commit is contained in:
Florent Le Coz
2014-03-24 20:39:59 +01:00
parent ffc820e234
commit cdc3183d9e
3 changed files with 16 additions and 1 deletions
+2 -1
View File
@@ -118,7 +118,8 @@ int main(int ac, char** av)
// happened because we sent something invalid to it and it decided to
// close the connection. This is a bug that should be fixed, but we
// still reconnect automatically instead of dropping everything
if (!exiting && !xmpp_component->is_connected() &&
if (!exiting && xmpp_component->ever_auth &&
!xmpp_component->is_connected() &&
!xmpp_component->is_connecting())
{
xmpp_component->reset();