We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
version 2022.10.10.00 server code
namespace apache { namespace thrift { template <typename T> class MyEvbAsyncProcessorFactory : public AsyncProcessorFactory { public: explicit MyEvbAsyncProcessorFactory(std::shared_ptr<T> t) { svIf_ = t; } std::unique_ptr<apache::thrift::AsyncProcessor> getProcessor() override { return std::unique_ptr<apache::thrift::AsyncProcessor>(new typename T::ProcessorType(svIf_.get())); } std::vector<ServiceHandlerBase*> getServiceHandlers() override { return {svIf_.get()}; } CreateMethodMetadataResult createMethodMetadata() override { WildcardMethodMetadataMap wildcardMap; wildcardMap.wildcardMetadata = std::make_shared<WildcardMethodMetadata>(AsyncProcessorFactory::MethodMetadata::ExecutorType::EVB); wildcardMap.knownMethods = {}; return wildcardMap; } private: std::shared_ptr<T> svIf_; }; } // namespace thrift } // namespace apache auto handler = std::make_shared<Handler>(); auto procFactory = std::make_shared<apache::thrift::MyEvbAsyncProcessorFactory<Handler>>(handler); int ret = handler->init(*initParam_); if (ret != 0) { std::cout << "handler init failed" << endl; return nullptr; } auto server = std::make_unique<ThriftServer>(); server->setPort(initParam_->common.port); server->setProcessorFactory(procFactory); server->setMaxConnections(param.common.maxConn); server->setNumIOWorkerThreads(param.common.maxConn); server->setNumCPUWorkerThreads(param.common.workerCount); server->setIdleTimeout(std::chrono::milliseconds(0)); server->setConnectionAgeTimeout(std::chrono::milliseconds(0)); server->setStreamExpireTime(std::chrono::milliseconds(0));
[root@]# netstat -ae|grep "CLOSE_WAIT" | wc -l 897
The text was updated successfully, but these errors were encountered:
No branches or pull requests
version 2022.10.10.00
server code
[root@]# netstat -ae|grep "CLOSE_WAIT" | wc -l
897
The text was updated successfully, but these errors were encountered: