Skip to content

Commit 99adb39

Browse files
committed
Add check to confirm there're no pending operations before key return to free list
1 parent 9a5cbb7 commit 99adb39

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

pjlib/src/pj/ioqueue_winnt.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1042,6 +1042,9 @@ static void scan_closing_keys(pj_ioqueue_t *ioqueue)
10421042
pj_assert(key->closing != 0);
10431043

10441044
if (PJ_TIME_VAL_GTE(now, key->free_time)) {
1045+
/* Confirm that there're no any pending operations */
1046+
pj_assert(pj_list_empty(&key->pending_list));
1047+
10451048
pj_list_erase(key);
10461049
pj_list_push_back(&ioqueue->free_list, key);
10471050
}

0 commit comments

Comments
 (0)