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

Modify testing logic to immediately return if any of the simultaneous pings succeed #23

Open
MrCsabaToth opened this issue Jul 29, 2021 · 1 comment · May be fixed by #24
Open

Modify testing logic to immediately return if any of the simultaneous pings succeed #23

MrCsabaToth opened this issue Jul 29, 2021 · 1 comment · May be fixed by #24

Comments

@MrCsabaToth
Copy link

Currently the logic is "All addresses are pinged simultaneously. ... When all the requests complete with either success or failure, a check is made to see if the list contains at least one true boolean.". However if any of the hosts slow to respond (for example for some reason CloudFlare DNSes don't respond (#10 (comment)) then we have to wait a timeout (10 seconds). In my opinion if any of the pings succeed then the test could already cut short any other pings and return immediately.

@Daplex
Copy link

Daplex commented Oct 6, 2021

I made a PR #24 (comment)

There is however a breaking changes regarding the lastTryResults variable.
If you want to use my fix before it gets merged in this project, you can use my fork, you just have to paste this in your pubspec.yaml:

data_connection_checker:
    git:
      url: https://github.com/Daplex/data_connection_checker.git
      ref: 633f3254d2c407c4af95035997cca5b2c93dbbc2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants