Skip to content

Commit a912119

Browse files
committed
Fix a data race in a test
1 parent 5f02d99 commit a912119

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/realm/object-store/sync/sync_session.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,7 @@ void SyncSession::handle_error(sync::SessionErrorInfo error)
740740
return;
741741
}
742742

743-
// Dont't bother invoking m_config.error_handler if the sync is inactive.
743+
// Don't bother invoking m_config.error_handler if the sync is inactive.
744744
// It does not make sense to call the handler when the session is closed.
745745
if (m_state == State::Inactive || m_state == State::Paused) {
746746
return;

test/object-store/sync/flx_sync.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,8 @@ TEST_CASE("flx: client reset", "[sync][flx][client reset][baas]") {
612612
util::try_remove_dir_recursive(fresh_path);
613613

614614
auto config_copy = config_local;
615-
config_local.sync_config->error_handler = nullptr;
615+
config_copy.sync_config = std::make_shared<SyncConfig>(*config_copy.sync_config);
616+
config_copy.sync_config->error_handler = nullptr;
616617
auto&& [reset_future, reset_handler] = make_client_reset_handler();
617618
config_copy.sync_config->notify_after_client_reset = reset_handler;
618619

0 commit comments

Comments
 (0)