diff --git a/src/module/module_repo.c b/src/module/module_repo.c index 4b402a5c6554a44bbf3003d01351eeb6cd488a11..348756da15f2ffcd30e2f8c35fa8b5d153e72f3c 100644 --- a/src/module/module_repo.c +++ b/src/module/module_repo.c @@ -368,7 +368,10 @@ __worker_update(void *__repo) struct json_object *json; LOG_INFO("REPO", "Download kara list from %s (%s), directory is %s", repo->name, repo->get_all_json, repo->kara_dir); - __json_sync(repo, &json); + if (__json_sync(repo, &json)) { + LOG_ERROR("REPO", "Failed to get json, possibly no internet connexion or repo is down"); + pthread_exit(NULL); + } __handle_got_json(repo->db, repo, json); LOG_INFO("REPO", "Finished to download and insert kara list"); json_object_put(json);