From 2e6ccfa13fe2c0f8e6d5b6272114c0d2a54ca627 Mon Sep 17 00:00:00 2001 From: Hauke Petersen Date: Thu, 12 Apr 2018 13:58:12 +0200 Subject: [PATCH] net/rdcli_simple_standalone: fix error handling --- .../rdcli_simple/rdcli_simple_standalone.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sys/net/application_layer/rdcli_simple/rdcli_simple_standalone.c b/sys/net/application_layer/rdcli_simple/rdcli_simple_standalone.c index f5a93892fd..0bf1ff66b5 100644 --- a/sys/net/application_layer/rdcli_simple/rdcli_simple_standalone.c +++ b/sys/net/application_layer/rdcli_simple/rdcli_simple_standalone.c @@ -39,12 +39,15 @@ static void *reg_runner(void *arg) while (1) { if (rdcli_simple_register() != RDCLI_SIMPLE_OK) { - LOG_ERROR("[rdcli_simple] error: unable to trigger registration\n"); + /* if this fails once, it will always fail, so we might as well + * quit now */ + LOG_ERROR("[rdcli_simple] error: unable to send registration\n"); + break; } xtimer_sleep(RDCLI_UPDATE_INTERVAL); } - return NULL; /* should never be reached */ + return NULL; } void rdcli_simple_run(void)