We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4f72593 commit a0cfcb5Copy full SHA for a0cfcb5
1 file changed
libsql-replication/src/replicator.rs
@@ -139,6 +139,7 @@ pub struct Replicator<C, I> {
139
injector: I,
140
state: ReplicatorState,
141
frames_synced: usize,
142
+ max_handshake_retries: usize,
143
}
144
145
const INJECTOR_BUFFER_CAPACITY: usize = 10;
@@ -185,6 +186,7 @@ where
185
186
injector,
187
state: ReplicatorState::NeedHandshake,
188
frames_synced: 0,
189
+ max_handshake_retries: HANDSHAKE_MAX_RETRIES,
190
191
192
@@ -208,7 +210,7 @@ where
208
210
209
211
pub async fn try_perform_handshake(&mut self) -> Result<(), Error> {
212
let mut error_printed = false;
- for _ in 0..HANDSHAKE_MAX_RETRIES {
213
+ for _ in 0..self.max_handshake_retries {
214
tracing::debug!("Attempting to perform handshake with primary.");
215
match self.client.handshake().await {
216
Ok(_) => {
0 commit comments