| 96 | |
| 97 | template <typename T> |
| 98 | static void releaseOneDescriptor(const string& name, T& pTransport) { |
| 99 | if (pTransport) { |
| 100 | try { |
| 101 | pTransport->close(); |
| 102 | } catch (const TTransportException& ttx) { |
| 103 | string errStr = string("TServerFramework " + name + " close failed: ") + ttx.what(); |
| 104 | TOutput::instance()(errStr.c_str()); |
| 105 | } |
| 106 | } |
| 107 | } |
| 108 | |
| 109 | void TServerFramework::serve() { |
| 110 | shared_ptr<TTransport> client; |