Skip to content

Commit

Permalink
typo fix
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewjfreyer committed Jan 12, 2020
1 parent 79f9922 commit 28644fa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions support/mqtt
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,10 @@ mqtt_error_handler () {

if [ -n "$received" ]; then
#ERRORS
[[ ${received^^} =~ .*NO ROUTE TO HOST.* ]] && return_value=1 && print_message="networking errors, no route to host - check username, password, and host address"
[[ ${received^^} =~ .*CONNECTION REFUSED.* ]] && return_value=1 && print_message="mqtt broker refused connection - check username, password, and host address"
[[ ${received^^} =~ .*"NO ROUTE TO HOST".* ]] && return_value=1 && print_message="networking errors, no route to host - check username, password, and host address"
[[ ${received^^} =~ .*"CONNECTION REFUSED".* ]] && return_value=1 && print_message="mqtt broker refused connection - check username, password, and host address"
[[ ${received^^} =~ .*NETWORK.* ]] && [[ ${received^^} =~ .*UNREACHABLE.* ]] && return_value=0 && print_message="network is down. enqueuing command to try again after a delay"
[[ ${received^^} =~ .*LOOKUP ERROR.* ]] && return_value=0 && print_message="issue connecting to mqtt server (lookup error). enqueuing command to try again after a delay"
[[ ${received^^} =~ .*"LOOKUP ERROR".* ]] && return_value=0 && print_message="issue connecting to mqtt server (lookup error). enqueuing command to try again after a delay"

if [ -n "$last_error_message" ] && [ "$last_error_message" == "$print_message" ]; then
#HERE, WE HAVE A REPEATED ERROR
Expand Down

0 comments on commit 28644fa

Please sign in to comment.