1
1
diff --git a/node_modules/thrift/lib/nodejs/lib/thrift/http_connection.js b/node_modules/thrift/lib/nodejs/lib/thrift/http_connection.js
2
- index 17e0d0c..d1ead4a 100644
2
+ index 17e0d0c..9e90096 100644
3
3
--- a/node_modules/thrift/lib/nodejs/lib/thrift/http_connection.js
4
4
+++ b/node_modules/thrift/lib/nodejs/lib/thrift/http_connection.js
5
5
@@ -106,7 +106,7 @@ var HttpConnection = exports.HttpConnection = function(options) {
@@ -34,7 +34,7 @@ index 17e0d0c..d1ead4a 100644
34
34
}
35
35
}
36
36
}
37
- @@ -165,17 +166,15 @@ var HttpConnection = exports.HttpConnection = function(options) {
37
+ @@ -165,17 +166,17 @@ var HttpConnection = exports.HttpConnection = function(options) {
38
38
39
39
//Response handler
40
40
//////////////////////////////////////////////////
@@ -46,6 +46,8 @@ index 17e0d0c..d1ead4a 100644
46
46
if (response.statusCode !== 200) {
47
47
- this.emit("error", new THTTPException(response));
48
48
+ handleError(new THTTPException(response));
49
+ + response.destroy();
50
+ + return;
49
51
}
50
52
51
53
- response.on('error', function (e) {
@@ -55,7 +57,7 @@ index 17e0d0c..d1ead4a 100644
55
57
56
58
// When running directly under node, chunk will be a buffer,
57
59
// however, when running in a Browser (e.g. Browserify), chunk
58
- @@ -199,7 +198 ,9 @@ var HttpConnection = exports.HttpConnection = function(options) {
60
+ @@ -199,7 +200 ,9 @@ var HttpConnection = exports.HttpConnection = function(options) {
59
61
}
60
62
//Get the receiver function for the transport and
61
63
// call it with the buffer
@@ -66,7 +68,7 @@ index 17e0d0c..d1ead4a 100644
66
68
});
67
69
};
68
70
};
69
- @@ -212,18 +213 ,33 @@ util.inherits(HttpConnection, EventEmitter);
71
+ @@ -212,18 +215 ,33 @@ util.inherits(HttpConnection, EventEmitter);
70
72
* @event {error} the "error" event is raised upon request failure passing the
71
73
* Node.js error object to the listener.
72
74
*/
0 commit comments