Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed connect not backing off when a connection attempt failed #396

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ regex = "1.7"
serde = "1.0"
serde_derive = "1.0"
serde_yaml = "0.9"
serde_json = { version = "1.0", features = ["arbitrary_precision"] }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would you remove this feature, what bug does it solve? This means you will likely loose precision which is what you want (at least I don't 😉).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was encountering a bug similar to the one in this issue:

serde-rs/serde#2748

serde_json = { version = "1.0", features = [] }
bytes = "1.3"
url = "1.6"
bitflags = "2.4"
Expand Down
2 changes: 1 addition & 1 deletion lib/src/client/transport/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ impl AsyncSecureChannel {

pub async fn connect(&self) -> Result<SecureChannelEventLoop, StatusCode> {
self.request_send.store(None);
let mut backoff = self.session_retry_policy.new_backoff();
loop {
let mut backoff = self.session_retry_policy.new_backoff();
match self.connect_no_retry().await {
Ok(event_loop) => {
break Ok(event_loop);
Expand Down