Skip to content

Commit bffb758

Browse files
committed
Fix http.ClientRequest crashes if end() was called twice
Fixes #1417. Fixes #1223.
1 parent 62aaf56 commit bffb758

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

lib/http2.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -648,6 +648,9 @@ OutgoingMessage.prototype.addTrailers = function(headers) {
648648

649649

650650
OutgoingMessage.prototype.end = function(data, encoding) {
651+
if (this.finished) {
652+
return false;
653+
}
651654
if (!this._header) {
652655
this._implicitHeader();
653656
}

0 commit comments

Comments
 (0)