GitHub user geoffgom opened a pull request:

    https://github.com/apache/cordova-plugin-network-information/pull/23

    Fixing early calls connection state

    Our application requests directly "startup values" over an ajax connection.
    In the current browser implementation, the network-information plugin 
always returns "offline" (Conection.None), as the ajax request for google.com 
has not returned yet.
    It is only after a short time that the ajax call returns and give the 
correct network state.
    
    We propose the callback to be called when the call is finished, to avoid 
returning an incorrect network state (before evaluation).
    
    Regards
    
    Geoffroy

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/geoffgom/cordova-plugin-network-information 
master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-plugin-network-information/pull/23.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #23
    
----
commit a0976003b8a340482a8a0641f7e3beae244b1089
Author: Geoffroy Gomet <geoffroy.go...@gmail.com>
Date:   2015-01-08T07:02:34Z

    Update NetworkProxy.js

commit a96c6d2120d3482fe9a323e2bb81443fd51e9709
Author: Geoffroy Gomet <geoffroy.go...@gmail.com>
Date:   2015-01-08T08:46:29Z

    Update NetworkProxy.js
    
    In the current browser implementation, the network-information plugin 
always returns "offline" (Conection.None), as the ajax request for google.com 
has not returned yet.
    It is only after a short time that the ajax call returns and give the 
correct network state.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org
For additional commands, e-mail: dev-h...@cordova.apache.org

Reply via email to