Skip to content

Commit e249401

Browse files
committed
embedded replicas: Retry primary handshake 3 times instead of 100
Fixes #1676 Signed-off-by: Piotr Jastrzebski <piotr@chiselstrike.com>
1 parent 48fe492 commit e249401

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

libsql/src/replication/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,15 +149,15 @@ impl EmbeddedReplicator {
149149
encryption_config: Option<EncryptionConfig>,
150150
perodic_sync: Option<Duration>,
151151
) -> Result<Self> {
152-
let replicator = Arc::new(Mutex::new(
152+
let mut replicator =
153153
Replicator::new_sqlite(
154154
Either::Left(client),
155155
db_path,
156156
auto_checkpoint,
157157
encryption_config,
158-
)
159-
.await?,
160-
));
158+
).await?;
159+
replicator.set_primary_handshake_retries(3);
160+
let replicator = Arc::new(Mutex::new(replicator));
161161

162162
let mut replicator = Self {
163163
replicator,

0 commit comments

Comments
 (0)