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

killConnections does not work as specified on iOS #663

vjrantal opened this issue Mar 23, 2016 · 2 comments

killConnections does not work as specified on iOS #663

vjrantal opened this issue Mar 23, 2016 · 2 comments


Copy link

@vjrantal vjrantal commented Mar 23, 2016

The specification has killConnections documented like this:

 * # WARNING: This method is intended for internal Thali testing only. DO NOT
 * USE!
 * This method is only intended for iOS. It's job is to terminate all incoming
 * and outgoing multipeer connectivity framework browser, advertiser, MCSession
 * and stream connections immediately without using the normal stop and start
 * interfaces or TCP/IP level connections. The goal is to simulate what would
 * happen if we switched the phone to something like airplane mode. This
 * simulates what would happen if peers went out of range.
 * This method MUST return "Not Supported" if called on Android. On Android we
 * can get this functionality by using JXCore's ability to disable the local
 * radios.
 * | Error String | Description |
 * |--------------|-------------|
 * | Failed | Somehow the stop method couldn't do its job. Check the logs. |
 * | Not Supported | This method is not support on this platform. |
 * @private
 * @returns {Promise<?Error>}

However, on iOS, the implementation expects a peerIdentifier to be passed whereas the specification expects that all connections are killed.

Related to this, I renamed the function from killConnection to killConnections just so that there is a decent behavior when the function is called from the node layer.

@vjrantal vjrantal changed the title killConnections does not work as specifies on iOS killConnections does not work as specified on iOS Mar 23, 2016
Copy link
Member Author

@vjrantal vjrantal commented Mar 23, 2016

This can be reproduce with the unit test app and looks like this in the log:

,# 51. make sure we actually call kill connections properly
,2016-03-23 11:52:56.788 ThaliTest[2011:3475110] jxcore: killConnections
2016-03-23 11:52:56.789 ThaliTest[2011:3475110] jxcore: killConnections: badParam
,not ok 190 should not fail on iOS
,    operator: fail
,  ...
,# teardown
,# setup

The badParam is expected because we don't pass a peer identifier to the call.

@vjrantal vjrantal added the 2 - Ready label Mar 24, 2016
@vjrantal vjrantal added this to the New Infra milestone Mar 24, 2016
@yaronyg yaronyg added 1 - Backlog and removed 2 - Ready labels Apr 6, 2016
Copy link

@yaronyg yaronyg commented Aug 3, 2016

@baydet I'm assigning this to you to make sure we don't repeat the problem.

@yaronyg yaronyg closed this Aug 26, 2016
@yaronyg yaronyg removed the 1 - Backlog label Aug 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.