summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2005-05-24 22:58:57 +0000
committerRoger Dingledine <arma@torproject.org>2005-05-24 22:58:57 +0000
commit4f0d7b82ae70b7e5a978549feb8a21d50ed972b2 (patch)
tree3a877807ce6381dbef5a548bb61c38f18facbe83
parentf4a14410ad0a7941906d983b5134a25089094302 (diff)
downloadtor-4f0d7b82ae70b7e5a978549feb8a21d50ed972b2.tar.gz
tor-4f0d7b82ae70b7e5a978549feb8a21d50ed972b2.zip
make lucky's weird libevent poll einprogress bug just warn, not kill tor.
svn:r4300
-rw-r--r--src/or/main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/or/main.c b/src/or/main.c
index d2f4cc3926..1af82beeda 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -825,7 +825,7 @@ static void second_elapsed_callback(int fd, short event, void *args)
me ? me->address : options->Address, options->DirPort);
}
- /* if more than 10s have elapsed, probably the clock jumped: doesn't count. */
+ /* if more than 100s have elapsed, probably the clock jumped: doesn't count. */
if (seconds_elapsed < 100)
stats_n_seconds_working += seconds_elapsed;
else
@@ -943,7 +943,7 @@ static int do_main_loop(void) {
if (loop_result < 0) {
int e = errno;
/* let the program survive things like ^z */
- if (e != EINTR) {
+ if (e != EINTR && e != EINPROGRESS) {
#ifdef HAVE_EVENT_GET_METHOD
log_fn(LOG_ERR,"libevent poll with %s failed: %s [%d]",
event_get_method(), tor_socket_strerror(e), e);
@@ -953,6 +953,8 @@ static int do_main_loop(void) {
#endif
return -1;
} else {
+ if (e == EINPROGRESS)
+ log_fn(LOG_WARN,"libevent poll returned EINPROGRESS? Please report.");
log_fn(LOG_DEBUG,"event poll interrupted.");
/* You can't trust the results of this poll(). Go back to the
* top of the big for loop. */