-
Notifications
You must be signed in to change notification settings - Fork 10
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
Implement connectionStatus.startChecking(options) & connectionStatus.stopChecking() #13
Labels
Comments
good thinking, I think having two methods for one-time checks vs intervals makes it more clear. And with |
This was referenced Nov 17, 2015
connectionStatus.startChecking({
interval: 30000, // ms
timeout: 3000 // request timeout before aborting request
}) // returns undefined
connectionStatus.stopChecking() // returns undefined |
I'll give this a shot! |
Closed
gr2m
changed the title
Split .check()?
Implement connectionStatus.startChecking(options) & connectionStatus.stopChecking()
Dec 12, 2015
done via 33d9e98 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
.check()
can trigger a recurring check, but returns a single promise. The promise will resolve once, or reject once, even if the connection status changes later.I think you'd be doing these for different reasons. The recurring check would likely be for some user notification. A one-time check is more likely in response to something, like an error.
I think maybe these two things should be separate. Like a
.check()
that returns a promise, and a.startChecking({interval, timeout})
to start getting the events.The text was updated successfully, but these errors were encountered: