Loop::defer is not guaranteed to be called in fuzzing

This commit is contained in:
Alex Hultman
2023-04-19 14:59:55 +02:00
parent dc93838ca9
commit bfbcb23b68
+1 -2
View File
@@ -18,7 +18,7 @@ void test() {
.cert_file_name = "../misc/cert.pem",
.passphrase = "1234"
}).get("/*", [](auto *res, auto *req) {
bool *aborted = new bool;
auto aborted = std::make_shared<bool>();
*aborted = false;
res->onAborted([aborted]() {
*aborted = true;
@@ -31,7 +31,6 @@ void test() {
res->end("Hello async!");
});
}
delete aborted;
});
}).listen(9001, [](auto *listenSocket) {
listen_socket = listenSocket;