summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Smith (work) <jhs@iriscouch.com>2013-01-30 14:19:37 +0000
committerJason Smith (work) <jhs@iriscouch.com>2013-01-30 14:19:37 +0000
commite0278596ea3ac574bb0e16f730cb92c9a33af4be (patch)
treedd85bc71dff9e79288fa79028b4a979ebb001a93
parent068bbab393d19485a2c759b3939627b92ca08d4d (diff)
downloadcouchdb-e0278596ea3ac574bb0e16f730cb92c9a33af4be.tar.gz
No more readline.async(), that is out of scope for now
This reverts commit a614678c484f2f88a7baf729133a5bbae34e27b8.
-rw-r--r--share/server/loop.js16
1 files changed, 1 insertions, 15 deletions
diff --git a/share/server/loop.js b/share/server/loop.js
index 76cbbfff6..fcd016f17 100644
--- a/share/server/loop.js
+++ b/share/server/loop.js
@@ -146,18 +146,7 @@ var Loop = function() {
respond(["error","unnamed_error",e.toSource()]);
}
};
-
- if(readline.async) {
- readline.async(got_line)
- } else {
- while(line = readline())
- got_line(null, line)
- }
-
- function got_line(er, line) {
- if(er)
- throw er
-
+ while (line = readline()) {
cmd = JSON.parse(line);
State.line_length = line.length;
try {
@@ -172,9 +161,6 @@ var Loop = function() {
} catch(e) {
handleError(e);
}
-
- if(readline.async)
- readline.async(got_line)
};
};