| 749 | } |
| 750 | |
| 751 | static void ProxyHandshakeShutdownThread(void *args) |
| 752 | { |
| 753 | ShutdownThreadContext* ctx = (ShutdownThreadContext*)args; |
| 754 | while (!dmAtomicGet32(&ctx->m_GotIt)) |
| 755 | { |
| 756 | if (dmHttpClient::GetNumPoolConnections() == 0) |
| 757 | { |
| 758 | dmTime::Sleep(1000); |
| 759 | continue; |
| 760 | } |
| 761 | |
| 762 | // The proxy socket is published before the CONNECT tunnel is upgraded to TLS. |
| 763 | // Wait a bit so shutdown lands during the delayed SSL handshake on the test port. |
| 764 | dmTime::Sleep(200 * 1000); |
| 765 | |
| 766 | if (dmHttpClient::ShutdownConnectionPool() > 0) { |
| 767 | dmAtomicStore32(&ctx->m_GotIt, 1); |
| 768 | } else { |
| 769 | break; |
| 770 | } |
| 771 | } |
| 772 | } |
| 773 | |
| 774 | TEST_P(dmHttpClientTest, ClientThreadedShutdown) |
| 775 | { |
nothing calls this directly
no test coverage detected