| 1692 | }; |
| 1693 | |
| 1694 | static void ProxyHandshakeShutdownThreadLocal(void *args) |
| 1695 | { |
| 1696 | ProxyShutdownThreadContext* ctx = (ProxyShutdownThreadContext*)args; |
| 1697 | while (!dmAtomicGet32(&ctx->m_GotIt) && !dmAtomicGet32(&ctx->m_Stop)) |
| 1698 | { |
| 1699 | if (dmHttpClient::GetNumPoolConnections() == 0) |
| 1700 | { |
| 1701 | dmTime::Sleep(1000); |
| 1702 | continue; |
| 1703 | } |
| 1704 | |
| 1705 | // The proxy socket is published before the CONNECT tunnel is upgraded to TLS. |
| 1706 | // Wait a bit so shutdown lands during the delayed SSL handshake on the test port. |
| 1707 | dmTime::Sleep(200 * 1000); |
| 1708 | |
| 1709 | if (dmAtomicGet32(&ctx->m_Stop)) |
| 1710 | break; |
| 1711 | |
| 1712 | if (dmHttpClient::ShutdownConnectionPool() > 0) { |
| 1713 | dmAtomicStore32(&ctx->m_GotIt, 1); |
| 1714 | } else { |
| 1715 | break; |
| 1716 | } |
| 1717 | } |
| 1718 | } |
| 1719 | |
| 1720 | static void ProxyThreadedShutdownDuringHandshake(int port) |
| 1721 | { |
nothing calls this directly
no test coverage detected