Print an error message if mining.subscribe fails

This commit is contained in:
pooler 2014-03-31 14:29:19 +02:00
parent dd774a337e
commit d5e5505b19

4
util.c
View file

@ -851,8 +851,10 @@ start:
else else
sprintf(s, "{\"id\": 1, \"method\": \"mining.subscribe\", \"params\": [\"" USER_AGENT "\"]}"); sprintf(s, "{\"id\": 1, \"method\": \"mining.subscribe\", \"params\": [\"" USER_AGENT "\"]}");
if (!stratum_send_line(sctx, s)) if (!stratum_send_line(sctx, s)) {
applog(LOG_ERR, "stratum_subscribe send failed");
goto out; goto out;
}
if (!socket_full(sctx->sock, 30)) { if (!socket_full(sctx->sock, 30)) {
applog(LOG_ERR, "stratum_subscribe timed out"); applog(LOG_ERR, "stratum_subscribe timed out");