diff options
author | koichik <koichik@improvement.jp> | 2011-07-29 19:18:35 +0400 |
---|---|---|
committer | koichik <koichik@improvement.jp> | 2011-07-29 19:47:54 +0400 |
commit | bffb758243ca19d334696a07c8091cf5fb75fe7b (patch) | |
tree | 7413148a3e6525874409ac675b0b02f5a97c4c50 /lib | |
parent | 62aaf56d1bf4819bf78ecb352092b625b9a4a0ea (diff) |
Fix http.ClientRequest crashes if end() was called twice
Fixes #1417.
Fixes #1223.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/http2.js | 3 |
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(); } |