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

Method "resetBindAll" improvements #102

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

Conversation

cloudsurfers-it
Copy link

Description of the Change

Now when call resetBindAll always force bindProcessToNetwork(null) without network connection connected ("desired" variable equal NULL).

Events such network receiver and network callback are correctly managed and unregistered before register new events. This fix try to avoid double invoking of the same event and cause problems when connecting to a network with bindAll parameter set to TRUE and subsequently disconnected.

Benefits

If you connect to a Wifi network without internet connection (bindAll parameter activated) and subsequently connect to a Wifi network with internet connection, second connection invoke bindProcessToNetwork(network) also without bindAll parameter.
Now if you disconnect from network, resetBindAll don't work property and app doesn't access to mobile data connection for example.

Possible Drawbacks

From my tests and use case, nothing. I use this plugin to connect to a specific wifi network without internet connection and switching between different network configurations: mobile data, wifi with internet and wifi without internet access.

Applicable Issues

#94

…thout network connection connected.

Events such network receiver and network callback are correctly managed and unregistered before register new events. This fix try to avoid double invoking of the same event and cause problems when connecting to a network with bindAll parameter set to TRUE and subsequently disconnected.
@tripflex
Copy link
Owner

@cloudsurfers-it thanks for submitting this, can anybody else validate if they have tested this at all?

@siderisltd
Copy link

@tripflex I need this fix, but I am not sure how to verify it works.

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.

None yet

4 participants