Skip to content

Commit f29bf61

Browse files
committed
CDRIVER-1426 don't clear error when scan starts
1 parent 732f18b commit f29bf61

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/mongoc/mongoc-topology-scanner.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,6 @@ mongoc_topology_scanner_start (mongoc_topology_scanner_t *ts,
623623
return;
624624
}
625625

626-
memset (&ts->error, 0, sizeof (bson_error_t));
627626

628627
if (obey_cooldown) {
629628
/* when current cooldown period began */
@@ -660,7 +659,7 @@ mongoc_topology_scanner_finish (mongoc_topology_scanner_t *ts)
660659
bson_error_t *error = &ts->error;
661660
bson_string_t *msg;
662661

663-
BSON_ASSERT (!error->code); /* cleared by scanner_start */
662+
memset (&ts->error, 0, sizeof (bson_error_t));
664663

665664
msg = bson_string_new (NULL);
666665

0 commit comments

Comments
 (0)