1MONGOC_CLIENT_RESET(3) libmongoc MONGOC_CLIENT_RESET(3)
2
3
4
6 mongoc_client_reset - mongoc_client_reset()
7
9 void
10 mongoc_client_reset (mongoc_client_t *client);
11
12 Call this method in the child after forking to invalidate the mon‐
13 goc_client_t.
14
16 Calling mongoc_client_reset() prevents resource cleanup in the child
17 process from interfering with the parent process.
18
19 This method causes the client to clear its session pool without sending
20 endSessions. It also increments an internal generation counter on the
21 given client. After this method is called, cursors from previous gener‐
22 ations will not issue a killCursors command when they are destroyed.
23 Client sessions from previous generations cannot be used and should be
24 destroyed.
25
27 · client: A mongoc_client_t.
28
30 MongoDB, Inc
31
33 2017-present, MongoDB, Inc
34
35
36
37
381.17.4 Feb 04, 2021 MONGOC_CLIENT_RESET(3)