mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-26 22:44:21 +00:00
Check for negative wait time in socket_full.
This commit is contained in:
parent
837c7319f1
commit
eb9278ca53
2
util.c
2
util.c
@ -1033,6 +1033,8 @@ static bool socket_full(struct pool *pool, int wait)
|
|||||||
struct timeval timeout;
|
struct timeval timeout;
|
||||||
fd_set rd;
|
fd_set rd;
|
||||||
|
|
||||||
|
if (unlikely(wait < 0))
|
||||||
|
wait = 0;
|
||||||
FD_ZERO(&rd);
|
FD_ZERO(&rd);
|
||||||
FD_SET(sock, &rd);
|
FD_SET(sock, &rd);
|
||||||
timeout.tv_usec = 0;
|
timeout.tv_usec = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user