}
q = ngx_queue_head(&ctx->sent);
- start = ngx_queue_data(q, ngx_quic_frame_t, queue);
- pn = start->pnum;
- f = start;
do {
+ start = ngx_queue_data(q, ngx_quic_frame_t, queue);
+
+ wait = start->last + qc->tp.max_ack_delay - now;
+
+ if ((ngx_msec_int_t) wait > 0) {
+ break;
+ }
+
+ pn = start->pnum;
+
ngx_queue_init(&range);
/* send frames with same packet number to the wire */
} while (q != ngx_queue_sentinel(&ctx->sent));
- wait = start->last + qc->tp.max_ack_delay - now;
-
- if ((ngx_msec_int_t) wait > 0) {
- break;
- }
-
/* NGX_DONE is impossible here, such frames don't get into this queue */
if (ngx_quic_send_frames(c, &range) != NGX_OK) {
return NGX_ERROR;