       @terminal.setFocused false
       KD.getSingleton('windowController').removeLayer @
 
+    @on "KDObjectWillBeDestroyed", @bound "clearConnectionAttempts"
+
     $(window).on "blur", =>
       @terminal.setFocused false
 

      mainView = KD.getSingleton "mainView"
      mainView.toggleFullscreen()
      event.preventDefault()

class WebTermView extends KDView

  constructor: (options = {}, data) ->

    super options, data
    @initBackoff()

  viewAppended: ->
    @container = new KDView
