mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-30 23:53:32 +01:00
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. svn:r8272
This commit is contained in:
parent
f75ef94f27
commit
2a4d5782ef
@ -597,8 +597,11 @@ run_connection_housekeeping(int i, time_t now)
|
||||
}
|
||||
|
||||
/* 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
|
||||
|
Loading…
Reference in New Issue
Block a user