[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r8272: an even better check -- now servers hang up if they can't wr (tor/trunk/src/or)
- To: or-cvs@xxxxxxxxxxxxx
- Subject: [or-cvs] r8272: an even better check -- now servers hang up if they can't wr (tor/trunk/src/or)
- From: arma@xxxxxxxx
- Date: Mon, 28 Aug 2006 15:00:17 -0400 (EDT)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Mon, 28 Aug 2006 15:00:24 -0400
- Reply-to: or-talk@xxxxxxxxxxxxx
- Sender: owner-or-cvs@xxxxxxxxxxxxx
Author: arma
Date: 2006-08-28 15:00:17 -0400 (Mon, 28 Aug 2006)
New Revision: 8272
Modified:
tor/trunk/src/or/main.c
Log:
an even better check -- now servers hang up if they can't write
for a while, and clients hang up if they can't read for a while.
Modified: tor/trunk/src/or/main.c
===================================================================
--- tor/trunk/src/or/main.c 2006-08-28 18:51:36 UTC (rev 8271)
+++ tor/trunk/src/or/main.c 2006-08-28 19:00:17 UTC (rev 8272)
@@ -597,8 +597,11 @@
}
/* Expire any directory connections that haven't sent anything for 5 min */
- if (conn->type == CONN_TYPE_DIR && DIR_CONN_IS_SERVER(conn) &&
- conn->timestamp_lastwritten + DIR_CONN_MAX_STALL < now) {
+ if (conn->type == CONN_TYPE_DIR &&
+ ((DIR_CONN_IS_SERVER(conn) &&
+ conn->timestamp_lastwritten + DIR_CONN_MAX_STALL < now) ||
+ (!DIR_CONN_IS_SERVER(conn) &&
+ conn->timestamp_lastread + DIR_CONN_MAX_STALL < now))) {
log_info(LD_DIR,"Expiring wedged directory conn (fd %d, purpose %d)",
conn->s, conn->purpose);
/* This check is temporary; it's to let us know whether we should consider