make Mosquitto happy

This commit is contained in:
Sergio R. Caprile 2023-11-26 15:38:28 -03:00
parent 82916a1cef
commit 1f37595200

View File

@ -98,8 +98,9 @@ int main(void) {
bool done = false; // Event handler flips it to true when done
mg_mgr_init(&mgr); // Initialise event manager
mg_log_set(MG_LL_DEBUG); // Set log level
mg_ws_connect(&mgr, s_url, fn, &done, NULL); // Create client connection
while (done == false) mg_mgr_poll(&mgr, 1000); // Event loop
mg_mgr_free(&mgr); // Finished, cleanup
mg_ws_connect(&mgr, s_url, fn, &done, "%s", // Create client connection
"Sec-Websocket-Protocol: mqtt\r\n"); // Request MQTT protocol
while (done == false) mg_mgr_poll(&mgr, 1000); // Event loop
mg_mgr_free(&mgr); // Finished, cleanup
return 0;
}