diff options
author | Nick Mathewson <nickm@torproject.org> | 2015-08-07 09:12:33 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-08-07 09:12:33 -0400 |
commit | 720a9ccb2f4392ca12e9a473125e54c20c291d4a (patch) | |
tree | 8c7c72ff308e9639f5cbe81071a65b9ef7d1c65a /src/common/workqueue.c | |
parent | 9d1801b4b96d205d1896db754efbd54ecdf590d2 (diff) | |
download | tor-720a9ccb2f4392ca12e9a473125e54c20c291d4a.tar.gz tor-720a9ccb2f4392ca12e9a473125e54c20c291d4a.zip |
Check for EINTR correctly on windows
(even though these are nonblocking calls and EINTR shouldn't be possible).
Also, log what error we're seing if drain_fn fails.
Diffstat (limited to 'src/common/workqueue.c')
-rw-r--r-- | src/common/workqueue.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common/workqueue.c b/src/common/workqueue.c index c1bd6d4e8b..59284abfdf 100644 --- a/src/common/workqueue.c +++ b/src/common/workqueue.c @@ -473,7 +473,8 @@ replyqueue_process(replyqueue_t *queue) if (queue->alert.drain_fn(queue->alert.read_fd) < 0) { static ratelim_t warn_limit = RATELIM_INIT(7200); log_fn_ratelim(&warn_limit, LOG_WARN, LD_GENERAL, - "Failure from drain_fd"); + "Failure from drain_fd: %s", + tor_socket_strerror(tor_socket_errno(queue->alert.read_fd))); } tor_mutex_acquire(&queue->lock); |