diff options
-rw-r--r-- | libsoup/soup-connection.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libsoup/soup-connection.c b/libsoup/soup-connection.c index 34b9b2d1..21613946 100644 --- a/libsoup/soup-connection.c +++ b/libsoup/soup-connection.c @@ -604,7 +604,7 @@ guint soup_connection_connect_sync (SoupConnection *conn, GCancellable *cancellable) { SoupConnectionPrivate *priv; - guint status, event_id; + guint status, event_id = 0; SoupURI *connect_uri; SoupAddress *remote_addr; @@ -690,7 +690,7 @@ soup_connection_connect_sync (SoupConnection *conn, GCancellable *cancellable) soup_connection_disconnect (conn); } - if (priv->socket) + if (priv->socket && event_id) g_signal_handler_disconnect (priv->socket, event_id); if (priv->proxy_uri != NULL) |