Skip to content

Commit 867e24c

Browse files
committed
CDRIVER-748 fix mock server for TSAN
mock_server_hangs_up and mock_server_resets were closing a request stream directly from the main thread. But a request stream should only be accessed by the worker thread. This now adds a special reply to the worker thread's queue to signal a hangup or reset.
1 parent 78e0c56 commit 867e24c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/libmongoc/tests/mock_server/mock-server.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ struct _autoresponder_handle_t {
7272
int id;
7373
};
7474

75-
typedef enum { REPLY, HANGUP, RESET } reply_type_t;
75+
typedef enum {
76+
REPLY, HANGUP, RESET
77+
} reply_type_t;
7678

7779

7880
typedef struct {

0 commit comments

Comments
 (0)