diff options
author | Will Thompson <will.thompson@collabora.co.uk> | 2013-04-30 15:21:13 +0100 |
---|---|---|
committer | Will Thompson <will.thompson@collabora.co.uk> | 2013-04-30 15:21:13 +0100 |
commit | fd4661d6e05b80536b48fa23566dc3db1f01d7ce (patch) | |
tree | 1f125f4b6c43bf89f5716dc93f057aff4c35cdec /src/idle-roomlist-manager.h | |
parent | 97dcd4e6a110c426cfd620dd03fc368e75bb5924 (diff) |
Connection: fix a crash on Disconnect() during TLS verification
Previously, priv->conn was NULL until the TCP session was established,
so _iface_shut_down() would take the "no connection yet; call
_finish_shutdown_idle_func in an idle" path. But the TLS channel would
get closed (because the TLSManager listens for state changes to
Disconnected and closes all channels), causing the ServerConnection to
call the connect_async() callback and emit ::disconnected, and hence
finish shutting down the connection there. Then the idle would crash,
because it doesn't take a ref to the connection.
We should really cancel the connect_async() call in the new path in
_iface_shut_down() to cope with the case where we're still waiting for
the TCP connection to be established for some other reason. That, and a
test for that, will follow.
Diffstat (limited to 'src/idle-roomlist-manager.h')
0 files changed, 0 insertions, 0 deletions