       App.Delay.clear('websocket-no-connection-try-reconnect-message', 'ws')
       if @error
         @error.hide()
-        @error = false
+        @error        = false
         @tryToConnect = false
 
       @auth()

    if @backend is 'websocket'
      @ws = new window.WebSocket( protocol + window.location.hostname + '/ws' )
    else if @backend is 'websocketPort'
      websocket_port = App.Config.get('websocket_port') || '6042'
      @ws            = new window.WebSocket( protocol + window.location.hostname + ':' + websocket_port + '/' )
    else
      @_ajaxInit()

    # Set event handlers.
    @ws.onopen = =>
      @log 'notice', "new websocket (#{@channel()}) connection open"

      @connectionEstablished    = true
      @connectionWasEstablished = true

  connectionWasEstablished: false
  tryToConnect:             false
  backend:                  'websocket'
  backend_port:             ''
  client_id:                undefined
  error:                    false

