fix async bug in ios crash waterfall

previously, we'd respond to the client's current callback and then start
the shutdown sequence. this opened up a situation where the client could
then call another command (say driver.quit) during shutdown, enabling
the possibility of two simultaneous shutdown flows causing undefined
behavior. this fix makes sure we don't respond to the client for a
command that caused a crash until we're done shutting down.
This commit is contained in:
Jonathan Lipps
2014-08-29 14:05:39 -07:00
parent 4d2c4bacfc
commit 3c6a25b5ae
4 changed files with 55 additions and 13 deletions
+3
View File
@@ -62,6 +62,9 @@ exports.getStatus = function (req, res) {
if (typeof gitSha !== "undefined") {
data.build.revision = gitSha;
}
if (req.device && typeof req.device.getStatusExtensions === "function") {
data = _.extend(data, req.device.getStatusExtensions());
}
respondSuccess(req, res, data);
};