diff options
author | Nick Mathewson <nickm@torproject.org> | 2006-07-28 15:11:20 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2006-07-28 15:11:20 +0000 |
commit | 85f381153ba6a3c87e3e43e2640b313c27d9b2ff (patch) | |
tree | 46959266a23814748b6e4c7d18c811d10639ff26 /src/or/main.c | |
parent | 6dc13cdbeb184fb906e50e79346e684d83a49eb5 (diff) | |
download | tor-85f381153ba6a3c87e3e43e2640b313c27d9b2ff.tar.gz tor-85f381153ba6a3c87e3e43e2640b313c27d9b2ff.zip |
r6949@Kushana: nickm | 2006-07-28 10:17:38 -0400
Shave another 8 bytes from connection_t: turn inbuf_reached_eof into a bit, and lower timestamp_lastempty to or_connection_t
svn:r6934
Diffstat (limited to 'src/or/main.c')
-rw-r--r-- | src/or/main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/main.c b/src/or/main.c index 4ef3260e8b..4370dcbc1f 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -588,8 +588,8 @@ run_connection_housekeeping(int i, time_t now) or_options_t *options = get_options(); or_connection_t *or_conn; - if (conn->outbuf && !buf_datalen(conn->outbuf)) - conn->timestamp_lastempty = now; + if (conn->outbuf && !buf_datalen(conn->outbuf) && conn->type == CONN_TYPE_OR) + TO_OR_CONN(conn)->timestamp_lastempty = now; if (conn->marked_for_close) { /* nothing to do here */ @@ -684,7 +684,7 @@ run_connection_housekeeping(int i, time_t now) connection_mark_for_close(conn); conn->hold_open_until_flushed = 1; } else if ( - now >= conn->timestamp_lastempty + options->KeepalivePeriod*10 && + now >= or_conn->timestamp_lastempty + options->KeepalivePeriod*10 && now >= conn->timestamp_lastwritten + options->KeepalivePeriod*10) { log_fn(LOG_PROTOCOL_WARN,LD_PROTOCOL, "Expiring stuck OR connection to fd %d (%s:%d). (%d bytes to " |