Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RCORE-1982: Opening realm with cached user while offline results in fatal error and session does not retry connection #7365

Closed
wants to merge 12 commits into from
Prev Previous commit
Fixed some build/test issues
Michael Wilkerson-Barker committed Mar 4, 2024
commit 180e44b8f18ddf81459a9e9fb804114628c2156b
2 changes: 1 addition & 1 deletion src/realm/object-store/sync/sync_session.cpp
Original file line number Diff line number Diff line change
@@ -1251,7 +1251,7 @@ void SyncSession::update_access_token(const std::string& signed_token)
m_session->refresh(signed_token);
}
if (m_state == State::WaitingForAccessToken) {
do_revive(std::move(lock));
become_active();
}
}

4 changes: 2 additions & 2 deletions test/object-store/sync/app.cpp
Original file line number Diff line number Diff line change
@@ -273,7 +273,7 @@ TEST_CASE("app: verify app error codes", "[sync][app][local]") {
return false;
}
}
catch (const nlohmann::json::exception& ex) {
catch (const nlohmann::json::exception&) {
// It's also a failure if parsing the json body throws an exception
return false;
}
@@ -3033,7 +3033,7 @@ TEST_CASE("app: sync integration", "[sync][pbs][app][baas]") {
if (auto port_pos = original_host.find(":"); port_pos != std::string::npos) {
auto original_port_str = original_host.substr(port_pos + 1);

original_port = strtol(original_port_str.c_str(), nullptr, 10);
original_port = static_cast<uint16_t>(strtoul(original_port_str.c_str(), nullptr, 10));
original_address = original_host.substr(0, port_pos);
}

2 changes: 1 addition & 1 deletion test/test_sync.cpp
Original file line number Diff line number Diff line change
@@ -2943,7 +2943,7 @@ TEST_IF(Sync_SSL_Certificate_Verify_Callback_External, false)
config.reconnect_mode = ReconnectMode::testing;
sync::RandomEngine random;
util::seed_prng_nondeterministically(random); // Throws
Client client(client_config, random);
Client client(config, random);

auto ssl_verify_callback = [&](const std::string server_address, Session::port_type server_port,
const char* pem_data, size_t pem_size, int preverify_ok, int depth) {