Bug 61302 - Connector: either support multiple uses, or guard against them reliably
Summary: Connector: either support multiple uses, or guard against them reliably
Status: NEW
Alias: None
Product: Wocky
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
Depends on:
Reported: 2013-02-22 18:59 UTC by Will Thompson
Modified: 2013-02-22 18:59 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Description Will Thompson 2013-02-22 18:59:00 UTC
I tried to re-use a WockyConnector to reconnect after my successful connection was later disconnected. Initially wocky_connector_connect_async() failed immediately because priv->result was non-NULL, but I noticed that most (but not all!) code paths end up setting priv->result back to NULL. So I made it consistent http://cgit.freedesktop.org/wocky/commit/?id=e77ed03f87 and now it crashes later:

tcp_srv_connected: wocky-connector.c:941: SRV connection succeeded
wocky:ERROR:wocky-connector.c:1073:maybe_old_ssl: assertion failed: (priv->conn == NULL)

which is to say: priv->conn, which is the WockyXmppConnection, is never set to NULL once the connection is established.

I think it would be useful to be able to re-use the same connector. A start on fixing this would be to make the WockyXmppConnection (and full JID and session id) be the GSimpleAsyncResult's op_res_gpointer (probably fixing bug 35351 in passing).

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.