__connection_set_proxy_changed_callback(connection, NULL, NULL);
__connection_set_internet_state_changed_callback(connection, NULL, NULL);
__connection_set_ethernet_cable_state_changed_cb(connection, NULL, NULL);
- _connection_libnet_deinit(connection);
conn_handle_list = g_slist_remove(conn_handle_list, connection);
+ _connection_libnet_deinit(connection, (conn_handle_list == NULL));
g_free(connection);
connection = NULL;