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