Trigger more context functions when fuzzing

This commit is contained in:
Alex Hultman
2020-08-20 19:45:11 +02:00
parent 2544593c13
commit 426d4aa298
+11 -2
View File
@@ -13,9 +13,10 @@ void test() {
/* Fill with user data */ /* Fill with user data */
}; };
{
/* Keep in mind that uWS::SSLApp({options}) is the same as uWS::App() when compiled without SSL support. /* Keep in mind that uWS::SSLApp({options}) is the same as uWS::App() when compiled without SSL support.
* You may swap to using uWS:App() if you don't need SSL */ * You may swap to using uWS:App() if you don't need SSL */
uWS::App({ auto app = uWS::App({
/* There are example certificates in uWebSockets.js repo */ /* There are example certificates in uWebSockets.js repo */
.key_file_name = "../misc/key.pem", .key_file_name = "../misc/key.pem",
.cert_file_name = "../misc/cert.pem", .cert_file_name = "../misc/cert.pem",
@@ -49,8 +50,16 @@ void test() {
} }
}).listen(9001, [](auto *listenSocket) { }).listen(9001, [](auto *listenSocket) {
listen_socket = listenSocket; listen_socket = listenSocket;
}).run(); });
/* Trigger some context functions */
app.addServerName("", {});
app.removeServerName("");
app.missingServerName(nullptr);
app.getNativeHandle();
app.run();
}
uWS::Loop::get()->free(); uWS::Loop::get()->free();
} }