mirror of
https://github.com/curl/curl.git
synced 2026-07-04 05:47:17 +03:00
dedupe comments
This commit is contained in:
parent
0dae05b0b5
commit
17a823bdb5
3 changed files with 3 additions and 9 deletions
|
|
@ -1547,9 +1547,6 @@ static CURLcode cf_socket_send(struct Curl_cfilter *cf, struct Curl_easy *data,
|
|||
|
||||
if(!curlx_sztouz(rv, pnwritten)) {
|
||||
int sockerr = SOCKERRNO;
|
||||
/* The socket error may be EWOULDBLOCK or on some systems EAGAIN when
|
||||
it returned due to its inability to send off data without blocking.
|
||||
We therefore treat both error codes the same here */
|
||||
if(SOCK_EAGAIN(sockerr)
|
||||
#ifndef USE_WINSOCK
|
||||
|| (sockerr == SOCKEINTR) || (sockerr == SOCKEINPROGRESS)
|
||||
|
|
@ -1606,9 +1603,6 @@ static CURLcode cf_socket_recv(struct Curl_cfilter *cf, struct Curl_easy *data,
|
|||
|
||||
if(!curlx_sztouz(rv, pnread)) {
|
||||
int sockerr = SOCKERRNO;
|
||||
/* The socket error may be EWOULDBLOCK or on some systems EAGAIN when
|
||||
it returned due to its inability to read data without blocking.
|
||||
We therefore treat both error codes the same here */
|
||||
if(SOCK_EAGAIN(sockerr)
|
||||
#ifndef USE_WINSOCK
|
||||
|| (sockerr == SOCKEINTR)
|
||||
|
|
|
|||
|
|
@ -1137,6 +1137,9 @@ typedef unsigned int curl_bit;
|
|||
#define SOCKEWOULDBLOCK EWOULDBLOCK
|
||||
#endif
|
||||
|
||||
/* The socket error may be EWOULDBLOCK or on some systems EAGAIN when
|
||||
it returned due to its inability to send/read data without blocking.
|
||||
We therefore treat both error codes the same here */
|
||||
#if !defined(USE_WINSOCK) && EAGAIN != SOCKEWOULDBLOCK
|
||||
#define SOCK_EAGAIN(e) ((e) == SOCKEWOULDBLOCK || (e) == EAGAIN)
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -232,9 +232,6 @@ static int wakeup_inet(curl_socket_t socks[2], bool nonblocking)
|
|||
/* Do not block forever */
|
||||
if(curlx_timediff_ms(curlx_now(), start) > (60 * 1000))
|
||||
goto error;
|
||||
/* The socket error may be EWOULDBLOCK or on some systems EAGAIN when
|
||||
it returned due to its inability to read data without blocking.
|
||||
We therefore treat both error codes the same here */
|
||||
if(SOCK_EAGAIN(sockerr)
|
||||
#ifndef USE_WINSOCK
|
||||
|| (sockerr == SOCKEINTR) || (sockerr == SOCKEINPROGRESS)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue