fix race condition when setting the secure flag during test (#1742)

This commit is contained in:
Martin Chang 2023-08-23 23:58:29 +08:00 committed by GitHub
parent 17c80508c0
commit f1426c6e9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -59,11 +59,11 @@ void doTest(const HttpClientPtr &client, std::shared_ptr<test::Case> TEST_CTX)
auto &id = resp->getCookie("JSESSIONID");
REQUIRE(id);
haveCert = resp->peerCertificate() != nullptr;
sessionID = id;
client->addCookie(id);
waitCookie.set_value(1);
haveCert = resp->peerCertificate() != nullptr;
});
f.get();
CHECK(haveCert == client->secure());