Skip to content

Stucks in await taskTracker.responseCompleter.future, code not go to next line, no response #1446

Closed
@jonhcbs

Description

@jonhcbs

use 2.0.1 version, the code will stops at await taskTracker.responseCompleter.future, will not go to next line. after changed to 1.5.1, it works.

Using xcode 16, ios 17.x, and flutter 3.24.5.

anyone know what is this issue?

Future send(BaseRequest request) async {
...
request.headers.forEach(urlRequest.setValueForHttpHeaderField);
final task = urlSession.dataTaskWithRequest(urlRequest);
final taskTracker = _TaskTracker(request, profile);
_tasks[task] = taskTracker;
task.resume();

final maxRedirects = request.followRedirects ? request.maxRedirects : 0;

late URLResponse result;
result = await taskTracker.responseCompleter.future;

final response = result as HTTPURLResponse;

....
}

image

Metadata

Metadata

Assignees

Labels

package:cupertino_httpIssues related to package:cupertino_httptype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions