summaryrefslogtreecommitdiff
path: root/src/or/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/main.c')
-rw-r--r--src/or/main.c6
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 "