Skip to content

Commit

Permalink
jbuf: faster reduce wish size in adaptive mode
Browse files Browse the repository at this point in the history
  • Loading branch information
cspiel1 committed Sep 20, 2023
1 parent 6bb2817 commit d7ad3e6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/jbuf/jbuf.c
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,8 @@ static void calc_rdiff(struct jbuf *jb, uint16_t seq)
jb->wish = wish;
}
else if (wish < jb->wish) {
uint32_t dt = wish + 1 == jb->wish ? 6000 : 1000;
uint32_t dt = wish + 1 == jb->wish ? 6000 :
wish < jb->wish / 2 ? 100 : 1000;
if (!tmr_isrunning(&jb->tmr) || tmr_get_expire(&jb->tmr) > dt)
tmr_start(&jb->tmr, dt, wish_down, jb);

Expand Down

0 comments on commit d7ad3e6

Please sign in to comment.