diff options
author | Mario Emmenlauer <memmenlauer@biodataanalysis.de> | 2020-04-24 18:02:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-24 17:02:18 +0100 |
commit | 2d2df9e89210a768134a185808769566e2cd9aa8 (patch) | |
tree | 0fcd556b0501227bc5b94ff384deb40989b1ca53 /test/cpp | |
parent | 5ef8e3ec2ab39ea37f8437ae1b7ca1966287a934 (diff) | |
download | thrift-2d2df9e89210a768134a185808769566e2cd9aa8.tar.gz |
Allow wrapping TTransportFactory into a TZlibTransportFactory
Client: cpp
Diffstat (limited to 'test/cpp')
-rw-r--r-- | test/cpp/src/TestServer.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/test/cpp/src/TestServer.cpp b/test/cpp/src/TestServer.cpp index 8d5b4d93e..8fdab8653 100644 --- a/test/cpp/src/TestServer.cpp +++ b/test/cpp/src/TestServer.cpp @@ -735,8 +735,8 @@ int main(int argc, char** argv) { } if (zlib) { - // hmm.. doesn't seem to be a way to make it wrap the others... - transportFactory = std::make_shared<TZlibTransportFactory>(); + // currently TZlibTransportFactory is the only factory than can wrap another: + transportFactory = std::make_shared<TZlibTransportFactory>(transportFactory); } // Server Info @@ -816,7 +816,7 @@ int main(int argc, char** argv) { // if using header server->setOutputProtocolFactory(std::shared_ptr<TProtocolFactory>()); } - + apache::thrift::concurrency::ThreadFactory factory; factory.setDetached(false); std::shared_ptr<apache::thrift::concurrency::Runnable> serverThreadRunner(server); @@ -829,7 +829,7 @@ int main(int argc, char** argv) { thread->start(); gMonitor.waitForever(); // wait for a shutdown signal - + #ifdef HAVE_SIGNAL_H signal(SIGINT, SIG_DFL); #endif @@ -842,4 +842,3 @@ int main(int argc, char** argv) { cout << "done." << endl; return 0; } - |