[debugger] resume stdin at right time when running code remotely

pull/22966/head
Fedor Indutny 2011-09-08 23:04:37 +07:00
parent d36d5c34df
commit 46382a728a
1 changed files with 2 additions and 1 deletions

View File

@ -750,18 +750,19 @@ Interface.prototype.debugEval = function(code, context, filename, callback) {
self.pause();
client.reqEval(code, function(res) {
self.resume();
if (!res.success) {
if (res.message) {
callback(res.message);
} else {
callback(null);
}
self.resume();
return;
}
client.mirrorObject(res.body, function(mirror) {
callback(null, mirror);
self.resume();
});
});
};