On Tue, Feb 7, 2012 at 6:10 PM, Daniel P. Berrange <berrange@xxxxxxxxxx> wrote: > + if (self->priv->main_channel != NULL) > + return; > + self->priv->main_channel = g_object_ref(channel); The main channel is destroyed and recreated when reconnecting to use TLS. It is better to use a weak reference also to be sure the channel is destroyed when the connection is gone. Otherwise, there is some extra cleanup to do on the client side iirc. -- Marc-André Lureau