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

Multipath interactive mode: websockets doesn't work with Wi-Fi without internet connection #464

Closed
iSevenDays opened this issue Feb 8, 2018 · 2 comments

Comments

@iSevenDays
Copy link

iSevenDays commented Feb 8, 2018

Websockets doesn't work when iPhone has both WiFi and 3G enabled and connected, but WiFi router has no internet connection.
Steps to reproduce

  1. Enable 3G
  2. Enable Wi-Fi
  3. Connect to router Wi-Fi with stable internet connection
  4. Open any test application with Starscream
  5. Get the internet cable out of Wi-Fi router
  6. See websocket is disconnected and never reconnects

Usual standard REST requests that use .intereactive multipath mode works fine.

I found that your issue may be related to usage of c sockets, but seems you don't use POSIX sockets.
https://developer.apple.com/library/content/documentation/NetworkingInternetWeb/Conceptual/NetworkingOverview/CommonPitfalls/CommonPitfalls.html

Is there any way I can switch my connection from Wi-Fi without internet connection to 3G with a good internet connection?
Ideally, it should be done automatically.

Thanks

@iSevenDays
Copy link
Author

NSURLSessionStreamTask uses URLSession, a session can use .intereactive multipath mode

@acmacalister
Copy link
Collaborator

This sounds like a reachability issue, which has already been discussed on #401. You will need to implement Apple's Reachability APIs and handle whatever your app's reconnection logic when that happens.

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

No branches or pull requests

2 participants