The http_client sample ignored connect() errors and attempted to run
HTTP query even if the connection failed.
Additionally, in case the query failed, the sample called `exit(1)`
directly, causing busy-looping in the sample. This prevented the logger
output from being printed.
Both of those issues made the sample behavior very confusing when it
encountered connection problems. The sample did not print any output at
all (due to busy looping) or printed several connect failures (due to
ignoring connect() results). This commit fixes those problems.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>