And while there make it file-local.
t_proxyProtocolACL = g_initialProxyProtocolACL;
t_proxyProtocolExceptions = g_initialProxyProtocolExceptions;
t_udpclientsocks = std::make_unique<UDPClientSocks>();
- t_tcpClientCounts = std::make_unique<tcpClientCounts_t>();
if (g_proxyMapping) {
t_proxyMapping = make_unique<ProxyMapping>(*g_proxyMapping);
}
/* without reuseport, all listeners share the same sockets */
typedef vector<pair<int, std::function<void(int, boost::any&)>>> deferredAdd_t;
-typedef map<ComboAddress, uint32_t, ComboAddress::addressOnlyLessThan> tcpClientCounts_t;
-extern thread_local std::unique_ptr<tcpClientCounts_t> t_tcpClientCounts;
-
inline MT_t* getMT()
{
return g_multiTasker ? g_multiTasker.get() : nullptr;
uint16_t TCPConnection::s_maxInFlight;
-thread_local std::unique_ptr<tcpClientCounts_t> t_tcpClientCounts;
+using tcpClientCounts_t = map<ComboAddress, uint32_t, ComboAddress::addressOnlyLessThan>;
+static thread_local std::unique_ptr<tcpClientCounts_t> t_tcpClientCounts = std::make_unique<tcpClientCounts_t>();
static void handleRunningTCPQuestion(int fileDesc, FDMultiplexer::funcparam_t& var);