mirror of https://github.com/grpc/grpc-node.git
grpc-js: Fix reuse of channel filter stack factory
This commit is contained in:
parent
24ee5a0f16
commit
0de2aad269
|
@ -88,6 +88,10 @@ export class FilterStackFactory implements FilterFactory<FilterStack> {
|
|||
this.factories.unshift(...filterFactories);
|
||||
}
|
||||
|
||||
clone(): FilterStackFactory {
|
||||
return new FilterStackFactory(this.factories);
|
||||
}
|
||||
|
||||
createFilter(): FilterStack {
|
||||
return new FilterStack(
|
||||
this.factories.map((factory) => factory.createFilter())
|
||||
|
|
|
@ -439,7 +439,7 @@ export class InternalChannel {
|
|||
parentCall: parentCall,
|
||||
};
|
||||
|
||||
const call = new ResolvingCall(this, method, finalOptions, this.filterStackFactory, this.credentials._getCallCredentials(), getNextCallNumber());
|
||||
const call = new ResolvingCall(this, method, finalOptions, this.filterStackFactory.clone(), this.credentials._getCallCredentials(), getNextCallNumber());
|
||||
|
||||
if (this.channelzEnabled) {
|
||||
this.callTracker.addCallStarted();
|
||||
|
|
Loading…
Reference in New Issue