Commit 60c4cfb8 authored by Carlos Garnacho's avatar Carlos Garnacho

miners: Explicitly close the connection on shutdown

In miner-fs the final connection unref was missing, however don't
rely on refcount being perfectly accounted and explicitly close the
connection, so a clean exit is ensured.
parent 747f0acc
......@@ -999,6 +999,9 @@ main (gint argc, gchar *argv[])
g_object_unref (connection);
tracker_domain_ontology_unref (domain_ontology);
tracker_sparql_connection_close (sparql_conn);
g_object_unref (sparql_conn);
g_print ("\nOK\n\n");
return EXIT_SUCCESS;
......
......@@ -288,6 +288,7 @@ main (int argc, char **argv)
g_main_loop_run (loop);
g_main_loop_unref (loop);
tracker_sparql_connection_close (sparql_conn);
g_object_unref (sparql_conn);
g_object_unref (endpoint);
g_object_unref (miner);
......
......@@ -462,6 +462,8 @@ main (int argc, char *argv[])
g_object_unref (proxy);
g_object_unref (connection);
tracker_domain_ontology_unref (domain_ontology);
tracker_sparql_connection_close (sparql_connection);
g_object_unref (sparql_connection);
g_object_unref (config);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment