mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-11 07:17:58 +00:00
Check return value of stratum_parse.
This commit is contained in:
parent
ac9a4378d1
commit
31c3759ecd
7
util.c
7
util.c
@ -1116,7 +1116,12 @@ bool auth_stratum(struct pool *pool)
|
|||||||
/* Parse all data prior sending auth request */
|
/* Parse all data prior sending auth request */
|
||||||
while (sock_full(pool->sock, false)) {
|
while (sock_full(pool->sock, false)) {
|
||||||
sret = recv_line(pool->sock);
|
sret = recv_line(pool->sock);
|
||||||
parse_stratum(pool, sret);
|
if (!parse_stratum(pool, sret)) {
|
||||||
|
clear_sock(pool->sock);
|
||||||
|
applog(LOG_WARNING, "Failed to parse stratum buffer");
|
||||||
|
free(sret);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
free(sret);
|
free(sret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user