diff options
author | Roger Dingledine <arma@torproject.org> | 2006-04-08 07:54:11 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2006-04-08 07:54:11 +0000 |
commit | fab1feee26b26f925ddc9aff3412a646aa92a0b5 (patch) | |
tree | b24f49628846a51e91102bdb323e4ec3358f2a72 /src/or | |
parent | 557b174b8d7c46b640afe869955eb643c394de35 (diff) | |
download | tor-fab1feee26b26f925ddc9aff3412a646aa92a0b5.tar.gz tor-fab1feee26b26f925ddc9aff3412a646aa92a0b5.zip |
complain when we hit wsaenobufs on recv or write too.
perhaps this will help us hunt the bug.
svn:r6321
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/buffers.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/or/buffers.c b/src/or/buffers.c index 456b1e1b7b..f5dd19135b 100644 --- a/src/or/buffers.c +++ b/src/or/buffers.c @@ -402,6 +402,10 @@ read_to_buf_impl(int s, size_t at_most, buf_t *buf, if (read_result < 0) { int e = tor_socket_errno(s); 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 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) { int e = tor_socket_errno(s); 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; } log_debug(LD_NET,"write() would block, returning."); |