     
     // close cable connection
     public func disconnect() {
+        reconnect = false
         ws.close()
         
         // unsubscribe from channels

    var channels:[ActionChannel] = []
    var ws: WebSocket
    var reconnectionWaitTime: Int64 = 5
    
    public init(mutableRequest: NSMutableURLRequest) {
        ws = WebSocket(request: mutableRequest)

        
        // when connects to socket subscribe all channels
        ws.event.open = {
            // set reconnection to true by default
            self.reconnect = true
            for channel in self.channels {
                if channel.status == .NotConnected {
                    channel.subscribe()
