mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-22 20:44:19 +00:00
Only use MSG_NOSIGNAL for !win32 since it doesn't exist on windows.
This commit is contained in:
parent
6acfdbd661
commit
832012f61d
4
util.c
4
util.c
@ -958,7 +958,11 @@ static enum send_ret __stratum_send(struct pool *pool, char *s, ssize_t len)
|
|||||||
FD_SET(sock, &wd);
|
FD_SET(sock, &wd);
|
||||||
if (select(sock + 1, NULL, &wd, NULL, &timeout) < 1)
|
if (select(sock + 1, NULL, &wd, NULL, &timeout) < 1)
|
||||||
return SEND_SELECTFAIL;
|
return SEND_SELECTFAIL;
|
||||||
|
#ifndef WIN32
|
||||||
sent = send(pool->sock, s + ssent, len, MSG_NOSIGNAL);
|
sent = send(pool->sock, s + ssent, len, MSG_NOSIGNAL);
|
||||||
|
#else
|
||||||
|
sent = send(pool->sock, s + ssent, len, 0);
|
||||||
|
#endif
|
||||||
if (sent < 0) {
|
if (sent < 0) {
|
||||||
if (!sock_blocks())
|
if (!sock_blocks())
|
||||||
return SEND_SENDFAIL;
|
return SEND_SENDFAIL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user