Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Commit

Permalink
cleanup agents
Browse files Browse the repository at this point in the history
  • Loading branch information
redmunds committed Oct 8, 2012
1 parent b156121 commit 2bf1f1e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/LiveDevelopment/LiveDevelopment.js
Expand Up @@ -336,6 +336,13 @@ define(function LiveDevelopment(require, exports, module) {
_setStatus(STATUS_INACTIVE);
}

function _onReconnect() {
unloadAgents();
var promises = loadAgents();
_setStatus(STATUS_LOADING_AGENTS);
$.when.apply(undefined, promises).then(_onLoad, _onError);
}

/** Open the Connection and go live */
function open() {
var result = new $.Deferred(),
Expand Down Expand Up @@ -489,7 +496,7 @@ define(function LiveDevelopment(require, exports, module) {
Inspector.Page.reload();

// Reload unsaved changes
_onConnect();
_onReconnect();
}
}
}
Expand Down

0 comments on commit 2bf1f1e

Please sign in to comment.