Skip to content

Commit 67963d6

Browse files
v3.1: tpu-client-next: set connection retry value to 1 for first retry (backport of #9581) (#9616)
tpu-client-next: set connection retry value to 1 for first retry (#9581) set connection retry value to 1 for first retry (cherry picked from commit 2dc0fac) Co-authored-by: kirill lykov <[email protected]>
1 parent 33876b9 commit 67963d6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tpu-client-next/src/connection_worker.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ impl ConnectionWorker {
251251
ConnectionError::VersionMismatch | ConnectionError::LocallyClosed => {
252252
ConnectionState::Closing
253253
}
254-
_ => ConnectionState::Retry(0),
254+
_ => ConnectionState::Retry(1),
255255
};
256256
}
257257

@@ -280,7 +280,7 @@ impl ConnectionWorker {
280280
// Check connection health before each send
281281
if connection.close_reason().is_some() {
282282
debug!("Connection closed during transaction batch sending");
283-
self.connection = ConnectionState::Retry(0);
283+
self.connection = ConnectionState::Retry(1);
284284
break;
285285
}
286286

@@ -292,7 +292,7 @@ impl ConnectionWorker {
292292
self.peer
293293
);
294294
record_error(error, &self.send_txs_stats);
295-
self.connection = ConnectionState::Retry(0);
295+
self.connection = ConnectionState::Retry(1);
296296
// Exit early since connection is likely broken
297297
break;
298298
} else {

0 commit comments

Comments
 (0)