Skip to content

Commit

Permalink
cachedb_mongodb: Avoid redundant mongoc_init() calls
Browse files Browse the repository at this point in the history
mongoc_init() is using pthread_once() anyway, so we might as well
avoid calling it multiple times.

(cherry picked from commit 7a5e2c7)
  • Loading branch information
liviuchircu committed Aug 18, 2017
1 parent 1720ef4 commit 62e4fdf
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions modules/cachedb_mongodb/cachedb_mongodb.c
Expand Up @@ -142,8 +142,6 @@ static int child_init(int rank)
return 0;
}

mongoc_init();

for (it = mongodb_script_urls;it;it=it->next) {
LM_DBG("iterating through conns - [%.*s]\n",it->url.len,it->url.s);
con = mongo_con_init(&it->url);
Expand Down

0 comments on commit 62e4fdf

Please sign in to comment.