Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorkoichik <koichik@improvement.jp>2011-07-29 19:18:35 +0400
committerkoichik <koichik@improvement.jp>2011-07-29 19:47:54 +0400
commitbffb758243ca19d334696a07c8091cf5fb75fe7b (patch)
tree7413148a3e6525874409ac675b0b02f5a97c4c50 /lib
parent62aaf56d1bf4819bf78ecb352092b625b9a4a0ea (diff)
Fix http.ClientRequest crashes if end() was called twice
Fixes #1417. Fixes #1223.
Diffstat (limited to 'lib')
-rw-r--r--lib/http2.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/http2.js b/lib/http2.js
index 55b43282e9e..bc87442f64f 100644
--- a/lib/http2.js
+++ b/lib/http2.js
@@ -648,6 +648,9 @@ OutgoingMessage.prototype.addTrailers = function(headers) {
OutgoingMessage.prototype.end = function(data, encoding) {
+ if (this.finished) {
+ return false;
+ }
if (!this._header) {
this._implicitHeader();
}