Explorar o código

expire wedged dir conns after 5min without write, not simply after 5min

svn:r1673
Roger Dingledine %!s(int64=21) %!d(string=hai) anos
pai
achega
5cfec379ae
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      src/or/main.c

+ 2 - 2
src/or/main.c

@@ -307,8 +307,8 @@ static void run_connection_housekeeping(int i, time_t now) {
   connection_t *conn = connection_array[i];
   connection_t *conn = connection_array[i];
 
 
   if(conn->type == CONN_TYPE_DIR &&
   if(conn->type == CONN_TYPE_DIR &&
-     conn->timestamp_created + 5*60 < now) {
-    log_fn(LOG_INFO,"Expiring wedged directory conn (purpose %d)", conn->purpose);
+     conn->timestamp_lastwritten + 5*60 < now) {
+    log_fn(LOG_WARN,"Expiring wedged directory conn (purpose %d)", conn->purpose);
     connection_mark_for_close(conn,0);
     connection_mark_for_close(conn,0);
     conn->hold_open_until_flushed = 1; /* give it a last chance */
     conn->hold_open_until_flushed = 1; /* give it a last chance */
     return;
     return;