Skip to content

Commit

Permalink
Add check to confirm there're no pending operations before key return…
Browse files Browse the repository at this point in the history
… to free list
  • Loading branch information
jimying committed Dec 3, 2024
1 parent 9a5cbb7 commit 99adb39
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pjlib/src/pj/ioqueue_winnt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1042,6 +1042,9 @@ static void scan_closing_keys(pj_ioqueue_t *ioqueue)
pj_assert(key->closing != 0);

if (PJ_TIME_VAL_GTE(now, key->free_time)) {
/* Confirm that there're no any pending operations */
pj_assert(pj_list_empty(&key->pending_list));

pj_list_erase(key);
pj_list_push_back(&ioqueue->free_list, key);
}
Expand Down

0 comments on commit 99adb39

Please sign in to comment.