diff --git a/rlgterm.js b/rlgterm.js index 10204e2..7664add 100644 --- a/rlgterm.js +++ b/rlgterm.js @@ -152,7 +152,7 @@ function processMsg(msg) { nrecv++; } } - else if (response.n > nrecv) { + else if (msgDict.n > nrecv) { /* The current message comes after one still missing. Queue this one * for later use. */ debug(1, "Got packet " + msgDict.n + ", expected " + nrecv); diff --git a/rlgwebd.js b/rlgwebd.js index 9183f1c..cecbd97 100755 --- a/rlgwebd.js +++ b/rlgwebd.js @@ -391,7 +391,7 @@ function logout(term, res) { sendError(res, 1, null); return; } - cterm.close(); + term.close(); var resheaders = {'Content-Type': 'text/plain'}; res.writeHead(200, resheaders); res.write(JSON.stringify({"t": "q"}));