Permalink
Browse files

Fix issue with debug.log messages being lost between requests.

  • Loading branch information...
1 parent 1a1c26f commit 978045d28825d7857443b9f972db7d2e928f7ed4 @Connorhd committed Sep 8, 2009
Showing with 3 additions and 1 deletion.
  1. +3 −1 debug.js
View
@@ -66,10 +66,11 @@ function handleConsole (id, res) {
session.timestamp = new Date();
if (session.queue.length > 0) {
res.simpleJSON(200, session.queue);
+ delete sessions[id].res;
session.queue = [];
} else {
session.res = res;
- session.timeout = setTimeout(function () { closeReq(res) }, 30000);
+ session.timeout = setTimeout(function () { closeReq(res); delete sessions[id].res; }, 30000);
}
}
@@ -90,6 +91,7 @@ debug.log = function (msg) {
if (session.res !== undefined) {
session.res.simpleJSON(200, session.queue);
+ delete sessions[id].res;
session.queue = [];
}
}

0 comments on commit 978045d

Please sign in to comment.