Skip to content

Commit

Permalink
[system] sleep: minor
Browse files Browse the repository at this point in the history
  • Loading branch information
avtolstoy committed Oct 5, 2020
1 parent da7c0e0 commit 70f4f9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion system/src/system_sleep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ int system_sleep_ext(const hal_sleep_config_t* config, hal_wakeup_source_base_t*
}
// This flag seems to be redundant in the presence of Particle.setDisconnectOptions() and
// Particle.disconnect()
if (configHelper.sleepFlags().isSet(SystemSleepFlag::WAIT_CLOUD)) {
if (configHelper.sleepFlags().isSet(SystemSleepFlag::WAIT_CLOUD) && spark_cloud_flag_connected()) {
auto opts = CloudConnectionSettings::instance()->takePendingDisconnectOptions();
opts.graceful(true);
CloudConnectionSettings::instance()->setPendingDisconnectOptions(std::move(opts));
Expand Down

0 comments on commit 70f4f9a

Please sign in to comment.