adobe/brackets — pull request #3928 by jasonsanjose (2013-05-20 22:19:29+00:00)
Title: Fix live preview refresh issues (again)

Replaces original pull #3852

#3761 I found 2 issues here:

* When hitting refresh rapidly, the inspector API was returning an error ``Inspected frame has gone``. This was due to our ``keepAlive`` ``RemoteAgent`` function call trying to call to a page(frame?) that no longer exists. I've updated ``RemoteAgent`` to stop the ``keepAlive`` timer when a new page loads.
* After getting in the above error state where the inspector web socket is still open, there were async issues calling ``Inspector.connect()`` where the inspector may get a disconnect event in the middle of the connection process. This caused an error dialog to appear ``Unable to load live development page``. I've changed ``connect()`` to wait for a new ``disconnect()`` promise to complete.

#3792 After switching the current live document, remove all HTTP request filters.