Skip to content

Commit 2765848

Browse files
committed
Include default ttl
1 parent 0e86ecb commit 2765848

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ debug = true
2323

2424
[profile.wasm]
2525
inherits = "release"
26+
debug = true
2627

2728
[profile.wasm_asyncify]
2829
inherits = "wasm"

crates/core/src/sync/subscriptions.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,13 @@ pub fn apply_subscriptions(
100100
},
101101
sqlite::Destructor::STATIC,
102102
)?;
103-
match &subscription.ttl {
104-
Some(ttl) => stmt.bind_int64(4, ttl.as_secs() as i64),
105-
None => stmt.bind_null(4),
106-
}?;
103+
stmt.bind_int64(
104+
4,
105+
subscription
106+
.ttl
107+
.map(|f| f.as_secs() as i64)
108+
.unwrap_or(LocallyTrackedSubscription::DEFAULT_TTL) as i64,
109+
)?;
107110
stmt.exec()?;
108111
}
109112
SubscriptionChangeRequest::Unsubscribe(subscription) => {

0 commit comments

Comments
 (0)