The framework crashes from time to time as the picture shows above.
The reason is because subscriptionsWaitingAck is not thread safe. If there are many subscriptions happen simultaneously, the data racing issue will pop up. Please consider to make these variables thread safe. thanks
/// The subscribed topics in current communication
public var subscriptions: [String: CocoaMQTTQoS] = [:]
fileprivate var subscriptionsWaitingAck: [UInt16: [MqttSubscription]] = [:]
fileprivate var unsubscriptionsWaitingAck: [UInt16: [MqttSubscription]] = [:]
The framework crashes from time to time as the picture shows above.
The reason is because
subscriptionsWaitingAck
is not thread safe. If there are many subscriptions happen simultaneously, the data racing issue will pop up. Please consider to make these variables thread safe. thanks