@@ -884,7 +884,7 @@ void otaUpdate()
884884 // is requesting the firmware update via those interfaces, thus we attempt an update
885885 // only once, stopping the state machine on failure
886886
887- if (websocketConnected )
887+ if (webSocketsIsConnected () )
888888 {
889889 // Report failed connection to web client
890890 webSocketsSendString ((char *)" newFirmwareVersion,NO_INTERNET," );
@@ -941,7 +941,7 @@ void otaUpdate()
941941 {
942942 otaRequestFirmwareVersionCheck = false ;
943943
944- if (websocketConnected )
944+ if (webSocketsIsConnected () )
945945 {
946946 char newVersionCSV[40 ];
947947 snprintf (newVersionCSV, sizeof (newVersionCSV), " newFirmwareVersion,%s," ,
@@ -966,7 +966,7 @@ void otaUpdate()
966966 else
967967 {
968968 systemPrintln (" Version Check: Firmware is up to date. No new firmware available." );
969- if (websocketConnected )
969+ if (webSocketsIsConnected () )
970970 webSocketsSendString ((char *)" newFirmwareVersion,CURRENT," );
971971
972972 otaUpdateStop ();
@@ -976,7 +976,7 @@ void otaUpdate()
976976 {
977977 // Failed to get version number
978978 systemPrintln (" Failed to get version number from server." );
979- if (websocketConnected )
979+ if (webSocketsIsConnected () )
980980 webSocketsSendString ((char *)" newFirmwareVersion,NO_SERVER," );
981981
982982 // Report failure over the CLI
@@ -995,7 +995,7 @@ void otaUpdate()
995995 {
996996 otaUpdateStop ();
997997
998- if (websocketConnected )
998+ if (webSocketsIsConnected () )
999999 webSocketsSendString ((char *)" gettingNewFirmware,ERROR," );
10001000
10011001 // Report failure over the CLI
@@ -1009,7 +1009,7 @@ void otaUpdate()
10091009 otaUpdateFirmware ();
10101010
10111011 // Update triggers ESP.restart(). If we get this far, the firmware update has failed
1012- if (websocketConnected )
1012+ if (webSocketsIsConnected () )
10131013 webSocketsSendString ((char *)" gettingNewFirmware,ERROR," );
10141014
10151015 // Report failure over the CLI
0 commit comments