Add a check
This commit is contained in:
parent
f312b5fe18
commit
94e3ae872f
1 changed files with 5 additions and 1 deletions
|
@ -170,6 +170,7 @@ void rr_deliver(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinfo, struct
|
|||
if (rr->wait[idx_real].on) {
|
||||
rr->wait[idx_real].on = 0;
|
||||
evt_core_rm_fd (ctx, rr->wait[idx_real].timer_fd);
|
||||
printf("Removed timer for packet %d\n",bp->ip.ap.str.id);
|
||||
}
|
||||
|
||||
// 2. We free the buffer if it's a control packet and quit
|
||||
|
@ -368,8 +369,11 @@ int rr_on_timer(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinfo) {
|
|||
struct rr_ctx* rr = app_ctx->misc;
|
||||
|
||||
struct waited_pkt* pkt = fdinfo->other;
|
||||
pkt->on = 0;
|
||||
evt_core_rm_fd(ctx, fdinfo->fd);
|
||||
if (ring_lt(pkt->id, rr->recv_id)) return 1;
|
||||
|
||||
printf("Timer reached for packet %d\n", pkt->id);
|
||||
pkt->on = 0;
|
||||
|
||||
//rr->remote_links &= 0xffff ^ 1 << pkt->link_num;
|
||||
rr->recv_id = pkt->id;
|
||||
|
|
Loading…
Reference in a new issue