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

Stop scanning after retrieving scan in SweepJS example #75

Closed
wants to merge 1 commit into from

Conversation

dcyoung
Copy link

@dcyoung dcyoung commented Apr 28, 2017

This is a temporary fix to the problems described in issue #69. See issue for details.

@daniel-j-h
Copy link
Collaborator

I don't think the stop scanning call here is correct - you're placing it inside the scan callback, which means after the first full scan we shut down. I really don't want to advertise the stop scanning function in the Js examples as it's super easy to get this wrong wrt. async. functions: if you place the stop scanning call at the end, it will be called immediately because the scan function is async.

@dcyoung
Copy link
Author

dcyoung commented May 1, 2017

Hmmm. This was only meant to be a temporary fix, as the sweepjs example is currently broken for me. But you are right that including the stop_scanning in the callback is rather poor practice, and could lead to issues in certain setups. I'm not sure why the application was hanging in its absence or how to properly remedy the behavior. Any ideas?

@dcyoung
Copy link
Author

dcyoung commented Jun 16, 2017

Closing this for now, as it is not the appropriate fix. Will try to test the issue again next week and see if I can't find a better solution.

@dcyoung dcyoung closed this Jun 16, 2017
@dcyoung dcyoung deleted the sweepjs-example-fix branch June 16, 2017 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants