         connect: =>
             # Whether we are going to reconnect or not, the cursor might have timed out.
             @container.saved_data.cursor_timed_out = true
+            if @timeout?
+                clearTimeout @timeout
 
             if @connection?
                 if @driver_status is 'connected'

            @results_view.cursor_timed_out()
            # We fail to connect, so we display a message except if we were already disconnected and we are not trying to manually reconnect
            # So if the user fails to reconnect after a failure, the alert will still flash
            if window.driver_connected_previous_state isnt false or @reconnecting is true
                @.$('#user-alert-space').hide()
                @.$('#user-alert-space').html @alert_connection_fail_template({})
                @.$('#user-alert-space').slideDown 'fast'
            @reconnecting = false
            @driver_connected = 'error'


            @.$('.wrapper_scrollbar').css 'width', ($(window).width()-92)+'px'

        destroy: =>
            @results_view.destroy()
            @history_view.destroy()
            @driver_handler.destroy()

            @display_normal()
            $(window).off 'resize', @display_full

            clearTimeout @timeout_driver_connect
            # We do not destroy the cursor, because the user might come back and use it.
    
