From 8755e5c77bccf0884d4d4f813ddda8be88966a81 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Tue, 29 Dec 2015 10:52:39 +1100 Subject: [PATCH] Fix passthrough failures falling through as success --- src/generator.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/generator.c b/src/generator.c index 28e61d79..2d5f5de4 100644 --- a/src/generator.c +++ b/src/generator.c @@ -725,15 +725,15 @@ out: static bool passthrough_stratum(connsock_t *cs, proxy_instance_t *proxi) { json_t *req, *val = NULL, *res_val, *err_val; + bool res, ret = false; float timeout = 10; - bool ret = false; JSON_CPACK(req, "{s:s,s:[s]}", "method", "mining.passthrough", "params", PACKAGE"/"VERSION); - ret = send_json_msg(cs, req); + res = send_json_msg(cs, req); json_decref(req); - if (!ret) { + if (!res) { LOGWARNING("Failed to send message in passthrough_stratum"); goto out; }