mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-10 14:58:01 +00:00
Cope with servers that return empty bodies that would otherwise crash jansson.
This commit is contained in:
parent
4de3f32a22
commit
e335d5211f
6
util.c
6
util.c
@ -284,6 +284,12 @@ json_t *json_rpc_call(CURL *curl, const char *url,
|
||||
goto err_out;
|
||||
}
|
||||
|
||||
if (!all_data.buf) {
|
||||
if (opt_debug)
|
||||
applog(LOG_DEBUG, "Empty data received in json_rpc_call.");
|
||||
goto err_out;
|
||||
}
|
||||
|
||||
/* If X-Long-Polling was found, activate long polling */
|
||||
if (hi.lp_path) {
|
||||
have_longpoll = true;
|
||||
|
Loading…
Reference in New Issue
Block a user