mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 14:23:30 +01:00
complain when we hit wsaenobufs on recv or write too.
perhaps this will help us hunt the bug. svn:r6321
This commit is contained in:
parent
557b174b8d
commit
fab1feee26
@ -402,6 +402,10 @@ read_to_buf_impl(int s, size_t at_most, buf_t *buf,
|
|||||||
if (read_result < 0) {
|
if (read_result < 0) {
|
||||||
int e = tor_socket_errno(s);
|
int e = tor_socket_errno(s);
|
||||||
if (!ERRNO_IS_EAGAIN(e)) { /* it's a real error */
|
if (!ERRNO_IS_EAGAIN(e)) { /* it's a real error */
|
||||||
|
#ifdef MS_WINDOWS
|
||||||
|
if (e == WSAENOBUFS)
|
||||||
|
log_warn(LD_NET,"recv() failed: WSAENOBUFS. Not enough ram?");
|
||||||
|
#endif
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
return 0; /* would block. */
|
return 0; /* would block. */
|
||||||
@ -572,6 +576,10 @@ flush_buf_impl(int s, buf_t *buf, size_t sz, size_t *buf_flushlen)
|
|||||||
if (write_result < 0) {
|
if (write_result < 0) {
|
||||||
int e = tor_socket_errno(s);
|
int e = tor_socket_errno(s);
|
||||||
if (!ERRNO_IS_EAGAIN(e)) { /* it's a real error */
|
if (!ERRNO_IS_EAGAIN(e)) { /* it's a real error */
|
||||||
|
#ifdef MS_WINDOWS
|
||||||
|
if (e == WSAENOBUFS)
|
||||||
|
log_warn(LD_NET,"write() failed: WSAENOBUFS. Not enough ram?");
|
||||||
|
#endif
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
log_debug(LD_NET,"write() would block, returning.");
|
log_debug(LD_NET,"write() would block, returning.");
|
||||||
|
Loading…
Reference in New Issue
Block a user