grpc-js: Destroy http2 stream when a call ends in any way

This commit is contained in:
murgatroid99 2020-02-03 10:44:58 -08:00
parent 6994f1b1df
commit 630897244e
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.
*/
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) {
this.trace(
'ended with status: code=' +