Create the pool lazily for two reasons 1. If dlib is imported from loaded from python it will crash and burn in OpenSSL as the we several symbol conflics, e.g. RSA_free, and the version from OpenSSL will be used instead of axTLS! 2. Startup performance. Minor in this context
| 74 | // the version from OpenSSL will be used instead of axTLS! |
| 75 | // 2. Startup performance. Minor in this context |
| 76 | dmConnectionPool::HPool GetPool() |
| 77 | { |
| 78 | DM_MUTEX_SCOPED_LOCK(m_Mutex); |
| 79 | if (m_Pool == 0) { |
| 80 | dmConnectionPool::Params params; |
| 81 | params.m_MaxConnections = MAX_POOL_CONNECTIONS; |
| 82 | dmConnectionPool::Result r = dmConnectionPool::New(¶ms, &m_Pool); |
| 83 | assert(r == dmConnectionPool::RESULT_OK); |
| 84 | } |
| 85 | return m_Pool; |
| 86 | } |
| 87 | |
| 88 | dmConnectionPool::HPool GetPoolNoCreate() |
| 89 | { |
no test coverage detected