Repository navigation
Conversation
ZeroOptions::hidden_disconnect_delay_ms now defaults to 300,000 ms, as JS's hiddenTabDisconnectDelay does, instead of 0. Memory stays the default storage, documented in PARITY.md as deliberate. Amp-Thread-ID: https://ampcode.com/threads/T-db04f816-97ed-4bc9-b19e-9ee68611a0ab Co-authored-by: tmm <tmm@tmm.dev>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
tmm's defaults decision, made as he asked:
ZeroOptions::hidden_disconnect_delay_msdefaults to 300,000 ms (5 minutes), as JS'shiddenTabDisconnectDelaydoes (DEFAULT_DISCONNECT_HIDDEN_DELAY_MSinzero.ts). Before, it was 0, which disconnected as soon asset_visible(false)was called. The field's doc comment tells mobile apps to set 0 to keep that behaviour, as Swift does.sqlitefeature, so the default build has no third-party dependencies, and the app chooses where its replica lives.Changeset:
zero-rustminor. A changed default is a behaviour change, and before 1.0 a breaking change bumps the minor version, as 0.2.0 did. The next release is 0.3.0.Test:
tests/visibility.rsuses default options. A hidden client is still connected after 299 s, with pings answered, and disconnected at 300 s. With the old 0 default it fails at the first assertion; I checked by reverting the default. The conformance vectors set the delay themselves, so nothing else tests Rust's own default.Nothing else depends on the default: no app calls
set_visible, and the conformance runner already passes JS's 300,000.Checked locally:
cargo fmt --checkandcargo clippy --workspace --all-targets --all-features -D warningscargo test --workspace --all-featuresandcargo doc -D warningsoxfmt --check