Azure / Azure/Communication

[iOS AzureCommunicationCalling 1.0.1] The callClient.createCallAgent block main thread if the network is poor or not connected

Open
#368 3 comments 0 reactions 0 assignees View on GitHub
Bug Needs: triage :mag:
Dominant language
No language data
Stars
340
Forks
113
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
Call the function blow when there is no Internet connection, there wouldn't have any call back and block the whole main thread if I make the call inside `DispatchQueue.main.async`

```
callClient?.createCallAgent(userCredential: tokenCredential, options: options) { [weak self] (agent, error) in
}
```

**To Reproduce**
Steps to reproduce the behavior:
1. Close the internet connection in your device
2. Try to create connection with `callClient?.createCallAgent`
3. There wouldn't have any callback to indicate the connection is failed

**Expected behavior**
There should have a callBack with an error indicate the connection failed.

**Screenshots**
If applicable, add screenshots to help explain your problem.

Log file:
[No Internet State.xcappdata.zip](https://github.com/Azure/Communication/files/7164904/No.Internet.State.xcappdata.zip)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.