From: Alan T. DeKok Date: Wed, 22 May 2024 17:41:08 +0000 (-0400) Subject: reset timer, and add some assertions X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c577cd3efd21477740aff5098466925e4beba834;p=thirdparty%2Ffreeradius-server.git reset timer, and add some assertions --- diff --git a/src/lib/bio/retry.c b/src/lib/bio/retry.c index 3bb3b1c3ac..9657a5dd6c 100644 --- a/src/lib/bio/retry.c +++ b/src/lib/bio/retry.c @@ -548,6 +548,7 @@ static void fr_bio_retry_timer(UNUSED fr_event_list_t *el, fr_time_t now, void * fr_assert(my->partial == NULL); item = my->first; + my->first = NULL; /* * Retry one item. @@ -562,9 +563,12 @@ static void fr_bio_retry_timer(UNUSED fr_event_list_t *el, fr_time_t now, void * } /* - * Partial write - no timers get set. + * Partial write - no timers get set. We need to wait until the descriptor is writable. */ - if (rcode == 0) return; + if (rcode == 0) { + fr_assert(my->partial != NULL); + return; + } /* * We successfull wrote this item. Reset the timer to the next one, which is likely to be a