sender: drain backlog with ack-gated catch-up sends
This commit is contained in:
@@ -1417,6 +1417,12 @@ static void sender_loop() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Catch-up mode: when backlog exists, send next queued batch without waiting
|
||||
// for the regular 30s cadence.
|
||||
if (!g_batch_ack_pending && g_batch_count > 1) {
|
||||
send_meter_batch(last_sample_ts());
|
||||
}
|
||||
} else {
|
||||
if (!g_batch_ack_pending && now_ms - g_last_sync_request_ms >= SYNC_REQUEST_INTERVAL_MS) {
|
||||
g_last_sync_request_ms = now_ms;
|
||||
|
||||
Reference in New Issue
Block a user