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

Call success callback after checking connection #46

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jeffcharles
Copy link

I noticed when using this library that the success callback on the connect call would execute before the network was connected. These changes validate that the network is actually connected to the correct network before calling the success callback.

I'm also open to putting this new behaviour behind an optional options flag if you'd prefer to keep the old behaviour for current users.

Prior to this change I've noticed that connect will call the success
callback before the connection is actually established. This will
ensure that the device is connected to the correct network and that the
state of the connection is one where network calls can be made right
after the success callback returns.
@hoerresb
Copy link
Owner

Thanks for the contribution. I typically do something very similar on the JavaScript side of this to make sure I'm connected to the network. I'm going to test your code and look it over. Might be simpler to do this way.

Thanks.

@hoerresb hoerresb closed this Oct 28, 2015
@jeffcharles
Copy link
Author

Would it be possible to get some sort of credit for my work in this PR? It appears it was copied and pasted into the codebase without attributing authorship.

@hoerresb
Copy link
Owner

Yes, sorry. Credit is due where credit is due.

I've already notice more things that need to updated. So, tonight when this gets updated I will merge your branch properly which should attribute you authorship.

@hoerresb hoerresb reopened this Nov 6, 2015
@tripflex
Copy link

tripflex commented Jan 5, 2018

Thanks for this, I created a fork of WifiWizard (named WifiWizard2), and added this PR to it, along with credit for you in the changelog:
https://github.com/tripflex/WifiWizard2

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 this pull request may close these issues.

3 participants