Using gossip, when I disconnect and reconnect a gabble account too fast I get this error message: ** (gossip:32393): WARNING **: Connect() failed: Error acquiring bus name org.freedesktop.Telepathy.Connection.gabble.jabber._testman_jabber_belnet_be_Telepathy: Connection manager already has a connection to this account. If I wait some seconds before reconnecting it works because gabble timeout and exits. If I run gabble with persist it never release the name. When reconnecting gossip tries to get existing connections, but the old connection has the disconnected status so it doesn't use it and prefer to request a new connection. Here is gabble's debug messages: ** (telepathy-gabble:414): DEBUG: request_reply_cb: Request 0x80d0d10 succeeded, notifying callback 0x80572e0 ** (telepathy-gabble:414): DEBUG: delete_request: Discarding request 0x80d0d10 ** (telepathy-gabble:414): DEBUG: connection_status_change: status 2 reason 1 ** (telepathy-gabble:414): DEBUG: gabble_roster_factory_iface_close_all: closing channels ** (telepathy-gabble:414): DEBUG: gabble_muc_factory_iface_close_all: closing channels ** (telepathy-gabble:414): DEBUG: gabble_media_factory_iface_close_all: closing channels ** (telepathy-gabble:414): DEBUG: connection_status_change: emitting status-changed with status 2 reason 1 ** (telepathy-gabble:414): DEBUG: gabble_roster_factory_iface_disconnected: removing callbacks ** (telepathy-gabble:414): DEBUG: gabble_muc_factory_iface_disconnected: removing callbacks ** (telepathy-gabble:414): DEBUG: gabble_media_factory_iface_disconnected: removing callbacks ** (telepathy-gabble:414): DEBUG: connection_status_change: still open; calling lm_connection_close ** (telepathy-gabble:414): DEBUG: connection_disconnected_cb: called with reason 0 ** (telepathy-gabble:414): DEBUG: connection_disconnected_cb: expected; emitting DISCONNECTED ** (telepathy-gabble:414): DEBUG: connection_disconnected_cb: dereferenced connection ** (telepathy-gabble:414): DEBUG: gabble_connection_get_protocol: rejected request as disconnected ** (telepathy-gabble:414): DEBUG: parse_parameters: accepted value testman@jabber.belnet.be for param account ** (telepathy-gabble:414): DEBUG: parse_parameters: accepted value <hidden> for param password ** (telepathy-gabble:414): DEBUG: parse_parameters: accepted value jabber.belnet.be for param server ** (telepathy-gabble:414): DEBUG: parse_parameters: accepted value Telepathy for param resource ** (telepathy-gabble:414): DEBUG: parse_parameters: accepted value 0 for param priority ** (telepathy-gabble:414): DEBUG: parse_parameters: accepted value 5223 for param port ** (telepathy-gabble:414): DEBUG: parse_parameters: accepted value 1 for param old-ssl ** (telepathy-gabble:414): DEBUG: parse_parameters: accepted value 0 for param register ** (telepathy-gabble:414): DEBUG: parse_parameters: accepted value 0 for param low-bandwidth ** (telepathy-gabble:414): DEBUG: parse_parameters: using default value for param https-proxy-server ** (telepathy-gabble:414): DEBUG: parse_parameters: accepted value 443 for param https-proxy-port ** (telepathy-gabble:414): DEBUG: parse_parameters: using default value for param fallback-conference-server ** (telepathy-gabble:414): DEBUG: parse_parameters: using default value for param stun-server ** (telepathy-gabble:414): DEBUG: parse_parameters: accepted value 3478 for param stun-port ** (telepathy-gabble:414): DEBUG: parse_parameters: accepted value 1 for param ignore-ssl-errors ** (telepathy-gabble:414): DEBUG: parse_parameters: using default value for param alias gabble_properties_mixin_emit_changed: emitting properties changed for property: stun-port gabble_properties_mixin_emit_flags: emitting properties flags changed for property: stun-port's flags now: [READ] ** (telepathy-gabble:414): DEBUG: gabble_connection_manager_request_connection failed: Error acquiring bus name org.freedesktop.Telepathy.Connection.gabble.jabber._testman_jabber_belnet_be_Telepathy: Connection manager already has a connection to this account. ** (telepathy-gabble:414): DEBUG: gabble_connection_dispose: called ** (telepathy-gabble:414): DEBUG: gabble_roster_dispose: dispose called ** (telepathy-gabble:414): DEBUG: gabble_roster_factory_iface_close_all: closing channels ** (telepathy-gabble:414): DEBUG: gabble_roster_finalize: called with 0x80aee90 ** (telepathy-gabble:414): DEBUG: gabble_muc_factory_dispose: dispose called ** (telepathy-gabble:414): DEBUG: gabble_muc_factory_iface_close_all: closing channels ** (telepathy-gabble:414): DEBUG: gabble_media_factory_dispose: dispose called ** (telepathy-gabble:414): DEBUG: gabble_media_factory_iface_close_all: closing channels ** (telepathy-gabble:414): DEBUG: gabble_disco_dispose: dispose called ** (telepathy-gabble:414): DEBUG: gabble_disco_finalize: called with 0x80b3500 ** (telepathy-gabble:414): DEBUG: gabble_presence_cache_dispose: dispose called ** (telepathy-gabble:414): DEBUG: gabble_presence_cache_finalize: called with 0x80d8a40 ** (telepathy-gabble:414): DEBUG: gabble_connection_finalize: called with 0x80b08b8
Seems butterfly has the same problem, the name stay with disconnected status.
I looked a bit more into the problem. When I disconnect a connection, the GabbleConnection object has refcount=7, changing status to disconnected remove one ref, if I add 5 g_object_unref (a ref is kept by glib/dbus for the method call) the object is destroyed, the name released and gossip can reconnect the account directly with no problem.
Created attachment 8364 [details] [review] proposed patch g_object_get() returns a new ref, so we need to unref the conn before returning.
Patch merged in 0.5.1, thanks. We believe this should now be fixed.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.