mirror of
https://github.com/profanity-im/profanity.git
synced 2025-01-03 14:57:42 -05:00
fix handling of connection errors
When a `see-other-host` stream-error is received we try to re-connect to
the other host. Erroneously this also started the `reconnect_timer`.
This lead to the behavior that in cases where e.g. the login failed
we try to reconnect instead of bailing out with an error.
This commit fixes the wrong behavior by not starting the `reconnect_timer`.
Fix 0e58509c16
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
This commit is contained in:
parent
fb91824883
commit
7a2af5e3ad
@ -549,8 +549,6 @@ session_reconnect(gchar* altdomain, unsigned short altport)
|
|||||||
{
|
{
|
||||||
reconnect.altdomain = altdomain;
|
reconnect.altdomain = altdomain;
|
||||||
reconnect.altport = altport;
|
reconnect.altport = altport;
|
||||||
assert(reconnect_timer == NULL);
|
|
||||||
reconnect_timer = g_timer_new();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -583,7 +581,8 @@ _session_reconnect(void)
|
|||||||
connection_connect(jid, saved_account.passwd, server, port, account->tls_policy, account->auth_policy);
|
connection_connect(jid, saved_account.passwd, server, port, account->tls_policy, account->auth_policy);
|
||||||
free(jid);
|
free(jid);
|
||||||
account_free(account);
|
account_free(account);
|
||||||
g_timer_start(reconnect_timer);
|
if (reconnect_timer)
|
||||||
|
g_timer_start(reconnect_timer);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user