@@ -342,7 +342,7 @@ bool webSocketsStart(void)
342342
343343 // Start the httpd server
344344 if (settings.debugWebServer == true )
345- systemPrintf (" Starting webSockets on port: %d\r\n " , config.server_port );
345+ systemPrintf (" webSockets starting on port: %d\r\n " , config.server_port );
346346
347347 if (settings.debugWebServer == true )
348348 {
@@ -354,13 +354,14 @@ bool webSocketsStart(void)
354354 {
355355 // Registering the ws handler
356356 if (settings.debugWebServer == true )
357- systemPrintln (" Registering URI handlers" );
357+ systemPrintln (" webSockets registering URI handlers" );
358358 httpd_register_uri_handler (webSocketsHandle, &webSocketsPage);
359359 return true ;
360360 }
361361
362362 // Display the failure to start
363- systemPrintf (" ERROR: webSockets failed to start, status: %s!\r\n " , esp_err_to_name (status));
363+ if (settings.debugWebServer )
364+ systemPrintf (" ERROR: webSockets failed to start, status: %s!\r\n " , esp_err_to_name (status));
364365 return false ;
365366}
366367
@@ -375,7 +376,9 @@ void webSocketsStop()
375376 {
376377 // Stop the httpd server
377378 esp_err_t status = httpd_stop (webSocketsHandle);
378- if (status != ESP_OK)
379+ if (status == ESP_OK)
380+ systemPrintf (" webSockets stopped\r\n " );
381+ else
379382 systemPrintf (" ERROR: webSockets failed to stop, status: %s!\r\n " , esp_err_to_name (status));
380383 webSocketsHandle = nullptr ;
381384 }
0 commit comments