ircv3: Remove another redundant account disconnection

Fri, 31 Jan 2025 23:14:52 -0600

author
Elliott Sales de Andrade <quantum.analyst@gmail.com>
date
Fri, 31 Jan 2025 23:14:52 -0600
changeset 43167
bae3d8a68760
parent 43166
d8bfc7d382e2
child 43168
866ae0f43fa7

ircv3: Remove another redundant account disconnection

When `ibis_client_stop` is called, it will set `IbisClient:connect` to `FALSE` and `IbisClient:error` to the input error.

The IRCv3 protocol's `notify` handler for the first one disconnects the account, so the `notify` handler for the latter should _not_ also disconnect the account. It is sufficient to just set the account error.

Testing Done:
Connected to a IRC that kicked me, and didn't see any warning about `purple_account_disconnect` being called when already disconnected.

Reviewed at https://reviews.imfreedom.org/r/3797/

protocols/ircv3/purpleircv3connection.c file | annotate | diff | comparison | revisions
--- a/protocols/ircv3/purpleircv3connection.c	Fri Jan 31 01:46:37 2025 -0600
+++ b/protocols/ircv3/purpleircv3connection.c	Fri Jan 31 23:14:52 2025 -0600
@@ -560,7 +560,7 @@
 	if(error != NULL) {
 		PurpleAccount *account = purple_connection_get_account(connection);
 
-		purple_account_disconnect_with_error(account, g_error_copy(error));
+		purple_account_set_error(account, g_error_copy(error));
 	}
 }
 

mercurial