[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] make lucky"s weird libevent poll einprogress bug just warn,...



Update of /home2/or/cvsroot/tor/src/or
In directory moria:/home/arma/work/onion/cvs/tor/src/or

Modified Files:
	main.c 
Log Message:
make lucky's weird libevent poll einprogress bug just warn, not kill tor.


Index: main.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/main.c,v
retrieving revision 1.502
retrieving revision 1.503
diff -u -d -r1.502 -r1.503
--- main.c	24 May 2005 17:13:15 -0000	1.502
+++ main.c	24 May 2005 22:58:57 -0000	1.503
@@ -825,7 +825,7 @@
              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 @@
     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 @@
 #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. */