File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -328,12 +328,13 @@ ArduinoIoTCloudTCP::State ArduinoIoTCloudTCP::handle_ConnectPhy()
328328
329329ArduinoIoTCloudTCP::State ArduinoIoTCloudTCP::handle_SyncTime ()
330330{
331- #pragma GCC diagnostic push
332- #pragma GCC diagnostic ignored "-Wunused-variable"
333- unsigned long const internal_posix_time = _time_service.getTime ();
334- #pragma GCC diagnostic pop
335- DEBUG_VERBOSE (" ArduinoIoTCloudTCP::%s internal clock configured to posix timestamp %d" , __FUNCTION__, internal_posix_time);
336- return State::ConnectMqttBroker;
331+ if (TimeServiceClass::isTimeValid (getTime ()))
332+ {
333+ DEBUG_VERBOSE (" ArduinoIoTCloudTCP::%s internal clock configured to posix timestamp %d" , __FUNCTION__, getTime ());
334+ return State::ConnectMqttBroker;
335+ }
336+
337+ return State::ConnectPhy;
337338}
338339
339340ArduinoIoTCloudTCP::State ArduinoIoTCloudTCP::handle_ConnectMqttBroker ()
You can’t perform that action at this time.
0 commit comments