         }
     }
     
+    public func stopReconnect() {
+        reconnectTimer?.invalidate()
+        reconnectTimer = nil
+    }
+    
+    public func stopReconnectAndDisconnect() {
+        reconnectTimer?.invalidate()
+        reconnectTimer = nil
+        self.disconnect()
+    }
+    
     private func checkConnectionHeader(connectionHeaders: [String: String] = [String: String]()) -> Bool{
         if (connectionHeaders.isEmpty){
             // No connection header

    // TODO: MAKE A VARIABLE TO CHECK RECONNECT OPTION IS AVAILABLE OR NOT
    public func reconnect(request: NSURLRequest, delegate: StompClientLibDelegate, connectionHeaders: [String: String] = [String: String](), time: Double = 1.0, exponentialBackoff: Bool = true){
        if #available(iOS 10.0, *) {
            Timer.scheduledTimer(withTimeInterval: time, repeats: true, block: { _ in
                self.reconnectLogic(request: request, delegate: delegate
                    , connectionHeaders: connectionHeaders)
            })

    public var certificateCheckEnabled = true
    private var urlRequest: NSURLRequest?
    
    private var reconnectTimer : Timer?
    
    public func sendJSONForDict(dict: AnyObject, toDestination destination: String) {
        do {
            let theJSONData = try JSONSerialization.data(withJSONObject: dict, options: JSONSerialization.WritingOptions())
