couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject git commit: No more readline.async(), that is out of scope for now
Date Wed, 30 Jan 2013 15:04:22 GMT
Updated Branches:
  refs/heads/nodejs_couchdb 068bbab39 -> e0278596e


No more readline.async(), that is out of scope for now

This reverts commit a614678c484f2f88a7baf729133a5bbae34e27b8.


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/e0278596
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/e0278596
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/e0278596

Branch: refs/heads/nodejs_couchdb
Commit: e0278596ea3ac574bb0e16f730cb92c9a33af4be
Parents: 068bbab
Author: Jason Smith (work) <jhs@iriscouch.com>
Authored: Wed Jan 30 14:19:37 2013 +0000
Committer: Jason Smith (work) <jhs@iriscouch.com>
Committed: Wed Jan 30 14:19:37 2013 +0000

----------------------------------------------------------------------
 share/server/loop.js |   16 +---------------
 1 files changed, 1 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/e0278596/share/server/loop.js
----------------------------------------------------------------------
diff --git a/share/server/loop.js b/share/server/loop.js
index 76cbbff..fcd016f 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)
   };
 };
 


Mime
View raw message