Skip to content

Commit

Permalink
fix asan issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jbreams committed May 6, 2022
1 parent 8d7a066 commit 9e53ab3
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/realm/sync/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -676,12 +676,11 @@ util::Optional<ClientReset>& SessionImpl::get_client_reset_config() noexcept
void SessionImpl::initiate_integrate_changesets(std::uint_fast64_t downloadable_bytes, DownloadBatchState batch_state,
const ReceivedChangesets& changesets)
{
bool simulate_integration_error = (m_wrapper.m_simulate_integration_error && !changesets.empty());
if (simulate_integration_error) {
on_integration_failure(IntegrationException(ClientError::bad_changeset, "simulated failure"), batch_state);
}

try {
bool simulate_integration_error = (m_wrapper.m_simulate_integration_error && !changesets.empty());
if (simulate_integration_error) {
throw IntegrationException(ClientError::bad_changeset, "simulated failure");
}
version_type client_version;
if (REALM_LIKELY(!get_client().is_dry_run())) {
VersionInfo version_info;
Expand All @@ -694,11 +693,6 @@ void SessionImpl::initiate_integrate_changesets(std::uint_fast64_t downloadable_
// Fake it for "dry run" mode
client_version = m_last_version_available + 1;
}

if (m_wrapper.m_on_download_integrated_hook) {
m_wrapper.m_on_download_integrated_hook();
}

on_changesets_integrated(client_version, m_progress.download, batch_state); // Throws
}
catch (const IntegrationException& e) {
Expand Down

0 comments on commit 9e53ab3

Please sign in to comment.