| 2102 | } |
| 2103 | |
| 2104 | INetwork* newNet2(const TLSConfig& tlsConfig, bool useThreadPool, bool useMetrics) { |
| 2105 | try { |
| 2106 | N2::g_net2 = new N2::Net2(tlsConfig, useThreadPool, useMetrics); |
| 2107 | } catch (boost::system::system_error e) { |
| 2108 | TraceEvent("Net2InitError").detail("Message", e.what()); |
| 2109 | throw unknown_error(); |
| 2110 | } catch (std::exception const& e) { |
| 2111 | TraceEvent("Net2InitError").detail("Message", e.what()); |
| 2112 | throw unknown_error(); |
| 2113 | } |
| 2114 | |
| 2115 | return N2::g_net2; |
| 2116 | } |
| 2117 | |
| 2118 | struct TestGVR { |
| 2119 | Standalone<StringRef> key; |