You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by ra...@apache.org on 2014/04/04 01:16:48 UTC

git commit: THRIFT-2446: cause servers to emit stream errors Client: node Patch: alexey

Repository: thrift
Updated Branches:
  refs/heads/master d06957bf9 -> 1be80dce3


THRIFT-2446: cause servers to emit stream errors
Client: node
Patch: alexey

Mods Thrift Node Servers to emit stream errors

This closes #94
----
commit 296f296db1d415b1d2a7bd8168f48cec5766a210
Author: gruzovator <gr...@gmail.com>
Date: 2014-04-03T15:16:07Z
nodejs server stream error handling


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

Branch: refs/heads/master
Commit: 1be80dce36a8dcefe6851428949409898f7415ff
Parents: d06957b
Author: ra <ra...@apache.org>
Authored: Thu Apr 3 08:55:18 2014 -0700
Committer: ra <ra...@apache.org>
Committed: Thu Apr 3 09:02:30 2014 -0700

----------------------------------------------------------------------
 lib/nodejs/lib/thrift/server.js | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/thrift/blob/1be80dce/lib/nodejs/lib/thrift/server.js
----------------------------------------------------------------------
diff --git a/lib/nodejs/lib/thrift/server.js b/lib/nodejs/lib/thrift/server.js
index 06ee90b..715378c 100644
--- a/lib/nodejs/lib/thrift/server.js
+++ b/lib/nodejs/lib/thrift/server.js
@@ -36,6 +36,9 @@ exports.createMultiplexServer = function(processor, options) {
 
   function serverImpl(stream) {
     var self = this;
+    stream.on('error', function(err) { 
+        self.emit('error', err); 
+    });
     stream.on('data', transport.receiver(function(transportWithData) {
       var input = new protocol(transportWithData);
       var output = new protocol(new transport(undefined, function(buf) {