summaryrefslogtreecommitdiff
path: root/daemon
diff options
context:
space:
mode:
Diffstat (limited to 'daemon')
-rw-r--r--daemon/snmp-engine.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/daemon/snmp-engine.c b/daemon/snmp-engine.c
index 972ebf1..de814b3 100644
--- a/daemon/snmp-engine.c
+++ b/daemon/snmp-engine.c
@@ -99,6 +99,7 @@ typedef struct _rb_request
uint32_t id;
mstime next_retry; /* Time of the next retry */
+ mstime last_sent; /* Time last sent */
mstime interval; /* How long between retries */
mstime timeout; /* When this request times out */
uint sent; /* How many times we've sent */
@@ -280,6 +281,7 @@ send_req(rb_request* req, mstime when)
req->next_retry = when + req->interval;
else
req->next_retry = 0;
+ req->last_sent = when;
}
static void
@@ -310,6 +312,9 @@ timeout_req(rb_request* req, mstime when)
incomplete = 1;
}
+ /* For timeouts we use the time the last request was sent */
+ when = req->last_sent;
+
free_req(req);
if(!incomplete)