Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/LiveDevelopment/LiveDevMultiBrowser.js
Original file line number Diff line number Diff line change
Expand Up @@ -557,9 +557,12 @@ define(function (require, exports, module) {
.on("ConnectionClose.livedev", function (event, msg) {
// close session when the last connection was closed
if (_protocol.getConnectionIds().length === 0) {
if (exports.status <= STATUS_ACTIVE) {
_close(false, "detached_target_closed");
}
setTimeout(function () {
if (_protocol.getConnectionIds().length === 0 &&
exports.status <= STATUS_ACTIVE) {
_close(false, "detached_target_closed");
}
}, 5000);
}
})
// extract stylesheets and create related LiveCSSDocument instances
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,6 @@
},

onClose: function () {
// TODO: This is absolutely temporary solution.
var body = document.getElementsByTagName("body")[0],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious, I guess this not an "absolutely temporary solution" after all?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@le717 :) it's been reworked from its original version, but the comment was left. what we have now seems to be satisfactory.

overlay = document.createElement("div"),
background = document.createElement("div"),
Expand Down Expand Up @@ -357,8 +356,7 @@
try {
msg = JSON.parse(msgStr);
} catch (e) {
console.log("[Brackets LiveDev] Invalid Message Received");
// TODO: we should probably send back an error message here?
console.log("[Brackets LiveDev] Malformed message received: ", msgStr);
return;
}
// delegates handling/routing to MessageBroker.
Expand Down