Skip to content
Browse files

properly close connections to postgres

  • Loading branch information...
1 parent 0eecadb commit 89af9171055267a87bcdab3a36ba630390664617 @lonvia lonvia committed Dec 16, 2012
Showing with 7 additions and 0 deletions.
  1. +7 −0 nominatim/index.c
View
7 nominatim/index.c
@@ -308,6 +308,13 @@ void nominatim_index(int rank_min, int rank_max, int num_threads, const char *co
{
nominatim_exportXMLEnd(writer);
}
+
+ // Close all connections
+ for (i = 0; i < num_threads; i++)
+ {
+ PQfinish(thread_data[i].conn);
+ }
+ PQfinish(conn);
}
void *nominatim_indexThread(void * thread_data_in)

0 comments on commit 89af917

Please sign in to comment.
Something went wrong with that request. Please try again.