mirror of https://github.com/grpc/grpc-node.git
grpc-js: Don't push messages after ending a call
This commit is contained in:
parent
075a75b015
commit
ed5b3ac1cd
|
@ -289,6 +289,13 @@ export class Http2CallStream implements Call {
|
||||||
);
|
);
|
||||||
this.canPush = false;
|
this.canPush = false;
|
||||||
process.nextTick(() => {
|
process.nextTick(() => {
|
||||||
|
/* If we have already output the status any later messages should be
|
||||||
|
* ignored, and can cause out-of-order operation errors higher up in the
|
||||||
|
* stack. Checking as late as possible here to avoid any race conditions.
|
||||||
|
*/
|
||||||
|
if (this.statusOutput) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.listener?.onReceiveMessage(message);
|
this.listener?.onReceiveMessage(message);
|
||||||
this.maybeOutputStatus();
|
this.maybeOutputStatus();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue