Skip to content

Connector::connect_attempt() should use handle and routing from previous attempts #3777

@coryan

Description

@coryan

The function receives a request parameter and clones it each time. It should create a new request in each attempt using the spec. So code like this:

        let inner = async move |_| {
            Self::connect_attempt(client.clone(), spec.clone(), &request, &options).await
        };
        gax::retry_loop_internal::retry_loop(inner, sleep, true, throttler, retry, backoff).await

Becomes:

        let inner = async move |_| {
            let request = BidiReadObjectRequest {
                spec: (*spec.lock().expect("never poisoned")).clone(),
                ranges: ranges.clone(),
            };
            Self::connect_attempt(client.clone(), spec.clone(), &options).await
        };
        gax::retry_loop_internal::retry_loop(inner, sleep, true, throttler, retry, backoff).await

Metadata

Metadata

Assignees

Labels

api: storageIssues related to the Cloud Storage API.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions