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

BKPeer sendData, tasks get stuck when the sendDataTasks array hold more than 1 task. #77

Open
ericwastaken opened this issue Oct 15, 2017 · 0 comments

Comments

@ericwastaken
Copy link
Contributor

The code in BKPeer.swift, sendData is as follows after a task is added to the sendDataTasks array

if sendDataTasks.count == 1 {
            processSendDataTasks()
        }

This processes the tasks if there's exactly 1 task in that array. Unfortunately, when you have multiple peers and/or you're sending a several data tasks, the array will grow past 1 and the processSendDataTasks() is never called.

The code should be:

if sendDataTasks.count >= 1 {
            processSendDataTasks()
        }

I'll follow this with a PR to address it.

Thanks,

Eric.

ericwastaken added a commit to ericwastaken/BluetoothKit that referenced this issue Oct 15, 2017
…han 1 yet the IF condition that fires them off is checking exactly for 1. This should be a check for >= 1 which is what this commit changes. See rhummelmose#77
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

1 participant