Merge pull request #1247 from murgatroid99/grpc-js_end_call_destroy_stream

grpc-js: Destroy http2 stream when a call ends in any way
This commit is contained in:
Michael Lumish 2020-02-04 10:16:08 -08:00 committed by GitHub
commit 69d95b2570
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -163,6 +163,9 @@ export class Http2CallStream extends Duplex implements Call {
* @param status The status of the call. * @param status The status of the call.
*/ */
private endCall(status: StatusObject): void { private endCall(status: StatusObject): void {
/* Once endCall is called, we are definitely not using the http2 stream
* anymore, so we can always safely destroy it here */
this.destroyHttp2Stream();
if (this.finalStatus === null) { if (this.finalStatus === null) {
this.trace( this.trace(
'ended with status: code=' + 'ended with status: code=' +