summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2014-03-24 20:39:59 +0100
committerFlorent Le Coz <louiz@louiz.org>2014-03-24 20:39:59 +0100
commitcdc3183d9eb234feb2e8ca3d3019b78cce73bcf6 (patch)
treea17a8f1068b4a101390cc6cd0de95067ae3588a9 /src/main.cpp
parentffc820e234ebba39a0f04607f9a0fb044fe31b73 (diff)
downloadbiboumi-cdc3183d9eb234feb2e8ca3d3019b78cce73bcf6.tar.gz
biboumi-cdc3183d9eb234feb2e8ca3d3019b78cce73bcf6.tar.bz2
biboumi-cdc3183d9eb234feb2e8ca3d3019b78cce73bcf6.tar.xz
biboumi-cdc3183d9eb234feb2e8ca3d3019b78cce73bcf6.zip
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
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index d40c457..6cba134 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -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();