Skip to content

Commit

Permalink
Merge pull request #54 from mikevanis/master
Browse files Browse the repository at this point in the history
Hotfix: add 4s delay before shutting down client, after wifi credential exchange
  • Loading branch information
andysheen authored Oct 9, 2020
2 parents 7ff7316 + 8e17a7e commit aafdbef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sockets_client.ino
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ void webSocketEvent(WStype_t type, uint8_t * payload, size_t length) {
case WStype_DISCONNECTED:
Serial.println("[WSc] Disconnected!\n");
//Hot fix for when client doesn't catch RESTART command
softReset(0);
softReset(4000);
break;
case WStype_CONNECTED:
Serial.println("Connected!");
Expand All @@ -25,7 +25,7 @@ void webSocketEvent(WStype_t type, uint8_t * payload, size_t length) {
#endif
String output = (char *)payload;
if (output == "RESTART") {
softReset(0);
softReset(4000);
Serial.println("i'm going to reset");
} else {
decodeData((char *)payload);
Expand Down

0 comments on commit aafdbef

Please sign in to comment.