Skip to content
Commit 937d4b6f authored by Robert Lubos's avatar Robert Lubos Committed by Alberto Escolar
Browse files

samples: net: http_client: Fix busy-looping in case of errors



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: default avatarRobert Lubos <robert.lubos@nordicsemi.no>
parent 3328d7cb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment