BluetoothKit
BluetoothKit copied to clipboard
BKPeer sendData, tasks get stuck when the sendDataTasks array hold more than 1 task.
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.