Add buffer release for control packets (health)
This commit is contained in:
parent
5d38679dbb
commit
5bcab96393
1 changed files with 5 additions and 3 deletions
|
@ -174,9 +174,8 @@ void rr_pkt_manage_links(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinf
|
|||
struct rr_ctx* rr = app_ctx->misc;
|
||||
|
||||
assert(bp->ip.ap.headers.cmd == CMD_HEALTH);
|
||||
if (ring_le(app_ctx->health_id, rr->health_id_late)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (ring_le(bp->ip.ap.health.id, rr->health_id_late)) goto release;
|
||||
|
||||
int64_t timeout = rr->mjit - (int64_t) bp->ip.ap.content.health.deltat;
|
||||
if (timeout <= 0) timeout = 0;
|
||||
|
@ -188,6 +187,9 @@ void rr_pkt_manage_links(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinf
|
|||
rr->wait[idx].algo = app_ctx;
|
||||
|
||||
set_timeout (ctx, timeout, &rr->wait[idx], on_timeout_health);
|
||||
|
||||
release:
|
||||
mv_buffer_rtof(app_ctx, fdinfo);
|
||||
}
|
||||
|
||||
void rr_pkt_unroll(struct evt_core_ctx* ctx, struct algo_ctx* app_ctx) {
|
||||
|
|
Loading…
Reference in a new issue