Merge pull request #20178 from vjpai/nopool

Don't start AuthMetadataProcessor threadpool for non-blocking processor
pull/20192/head
Vijay Pai 5 years ago committed by GitHub
commit 4be0af6b2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      src/cpp/server/secure_server_credentials.h

@ -46,7 +46,11 @@ class AuthMetadataProcessorAyncWrapper final {
AuthMetadataProcessorAyncWrapper(
const std::shared_ptr<AuthMetadataProcessor>& processor)
: thread_pool_(CreateDefaultThreadPool()), processor_(processor) {}
: processor_(processor) {
if (processor && processor->IsBlocking()) {
thread_pool_.reset(CreateDefaultThreadPool());
}
}
private:
void InvokeProcessor(grpc_auth_context* context, const grpc_metadata* md,

Loading…
Cancel
Save