     public func disconnect() {
         self.session = nil
         issueQueue.async {
-            self.delegate?.mqttConnected(false, for: self, error: error)
+            self.delegate?.mqttConnected(false, for: self, error: nil)
         }
     }
 }

			clientID: connectParams.clientID,
			cleanSession: connectParams.cleanSession,
			keepAlive: connectParams.keepAlive,
			connectionTimeout: connectParams.retryTimeInterval,
			useSSL: connectParams.useSSL)
    }
}

    
    fileprivate func connectResuscitate(_ completion: MQTTSessionCompletionBlock?) {
        if connectParams.keepAlive > 0 {
            DispatchQueue.global().asyncAfter(deadline: .now() + connectParams.resuscitateTimeInterval) { [weak self] in
                self?.connect { success, newError in
                    if success {
                        completion?(success, newError)
