File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -1736,6 +1736,7 @@ void cbThrottleTopic(char *throttleData, uint16_t len) {
17361736 WS_DEBUG_PRINT (" IO Throttle Error: " );
17371737 WS_DEBUG_PRINTLNVAR (throttleData);
17381738 uint32_t throttleDuration = 60000UL ; // duration of throttle in ms
1739+ bool parsingSuccessful = false ;
17391740 if (throttleData != NULL ) {
17401741 char *throttleMessage;
17411742 // Parse out # of seconds from message buffer
@@ -1745,9 +1746,14 @@ void cbThrottleTopic(char *throttleData, uint16_t len) {
17451746 if (throttleMessage != NULL ) {
17461747 // Convert from seconds to to millis
17471748 throttleDuration = (uint32_t )atoi (throttleMessage) * 1000UL ;
1749+ parsingSuccessful = true ;
17481750 }
17491751 }
17501752 }
1753+ if (!parsingSuccessful) {
1754+ WS_DEBUG_PRINTLN (
1755+ " ERROR: Unable to parse throttle duration from message, please report this! Defaulting to 60s." );
1756+ }
17511757 WS_DEBUG_PRINT (" Device is throttled for " );
17521758 WS_DEBUG_PRINTVAR (throttleDuration);
17531759 WS_DEBUG_PRINTLN (" ms and blocking command execution." );
You can’t perform that action at this time.
0 commit comments