Skip to content

Commit c619948

Browse files
committed
Fix from kostko's fork, commit 32a224f
1 parent dee9d29 commit c619948

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

libcurvecpr/lib/messager.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -523,6 +523,11 @@ long long curvecpr_messager_next_timeout (struct curvecpr_messager *messager)
523523

524524
if (at > block->clock + chicago->rtt_timeout)
525525
at = block->clock + chicago->rtt_timeout;
526+
527+
/* Writing faster than wr_rate does not make sense and will cause spinning. BUT, if
528+
there is something to acknowledge, block might still be resent. */
529+
if (cf->ops.recvmarkq_is_empty(messager) && at < messager->my_sent_clock + chicago->wr_rate)
530+
at = messager->my_sent_clock + chicago->wr_rate;
526531
}
527532

528533
if (chicago->clock > at)

0 commit comments

Comments
 (0)