Skip to content

Commit

Permalink
Merge pull request #2210 from particle-iot/ch64095/blinks_cyan_when_disc
Browse files Browse the repository at this point in the history
[Gen3] Fix LED behavior in case of network failure in Cloud Connecting state
  • Loading branch information
keeramis authored Oct 9, 2020
2 parents ce3d5a0 + d7cc575 commit 1f2d369
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions system/src/system_task.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,10 @@ void establish_cloud_connection()
// the last error diagnostic is used only for communication errors since we cannot mix
// HAL and communication error codes without specifying the category of an error
WARN("Cloud socket connection failed: %d", connect_result);
if (connect_result == SYSTEM_ERROR_NETWORK) {
LED_SIGNAL_STOP(CLOUD_HANDSHAKE);
LED_SIGNAL_STOP(CLOUD_CONNECTING);
}
SPARK_CLOUD_SOCKETED = 0;

diag->status(CloudDiagnostics::DISCONNECTED);
Expand Down

0 comments on commit 1f2d369

Please sign in to comment.