pidgin/pidgin

Fix XMPP not reconnecting after failed connection
release-2.x.y
23 months ago, Belgin Știrbu
ea52fcc50e50
Parents d060e3ab1f77
Children 851d7f3cce88
Fix XMPP not reconnecting after failed connection

After all the SRV hosts have been tried and they all failed,
we should signal that a connection failure has occured.

Testing Done:
Tried connecting to test@example.com. Before the patch, it just tried once then stopped. After the patch, it keeps retrying (with a timeout of a few seconds between).

Bugs closed: PIDGIN-17621

Reviewed at https://reviews.imfreedom.org/r/1455/
--- a/libpurple/protocols/jabber/jabber.c Fri May 13 00:40:37 2022 -0500
+++ b/libpurple/protocols/jabber/jabber.c Thu May 19 23:49:58 2022 -0500
@@ -807,6 +807,10 @@
if (js->srv_rec != NULL) {
purple_debug_error("jabber", "Unable to connect to server: %s. Trying next SRV record or connecting directly.\n", error);
try_srv_connect(js);
+ } else {
+ purple_connection_error_reason(js->gc,
+ PURPLE_CONNECTION_ERROR_NETWORK_ERROR,
+ _("Unable to connect"));
}
return;
}