aboutsummaryrefslogtreecommitdiff
path: root/forward-inline.h
diff options
context:
space:
mode:
Diffstat (limited to 'forward-inline.h')
-rw-r--r--forward-inline.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/forward-inline.h b/forward-inline.h
index 0ba0b23..09b9809 100644
--- a/forward-inline.h
+++ b/forward-inline.h
@@ -224,10 +224,17 @@ get_link_socket_info (struct context *c)
}
static inline void
-register_activity (struct context *c)
+register_activity (struct context *c, const int size)
{
if (c->options.inactivity_timeout)
- event_timeout_reset (&c->c2.inactivity_interval);
+ {
+ c->c2.inactivity_bytes += size;
+ if (c->c2.inactivity_bytes >= c->options.inactivity_minimum_bytes)
+ {
+ c->c2.inactivity_bytes = 0;
+ event_timeout_reset (&c->c2.inactivity_interval);
+ }
+ }
}
/*