Skip to content

Commit c68b576

Browse files
Merge pull request #195 from ammmze/patch-2
Prevent infinite echo loop
2 parents 53e1d2d + 36a05b3 commit c68b576

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

monitor.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1203,7 +1203,7 @@ while true; do
12031203
#exit
12041204
exit 0
12051205

1206-
elif [[ $mqtt_topic_branch =~ .*ECHO.* ]]; then
1206+
elif [[ $mqtt_topic_branch =~ .*ECHO.* ]] && [[ -z "$data_of_instruction" ]]; then
12071207
$PREF_VERBOSE_LOGGING && log "${GREEN}[CMD-INST] ${NC}[${GREEN}pass mqtt${NC}] echo ${NC}"
12081208

12091209
mqtt_echo

0 commit comments

Comments
 (0)