- Notifications
You must be signed in to change notification settings - Fork5.2k
Commite507e08
committed
oauth: Remove expired timers from the multiplexer
In a case similar to the previous commit, an expired timer can remainpermanently readable if Curl does not remove the timeout itself. Sincethat removal isn't guaranteed to happen in real-world situations,implement drain_timer_events() to reset the timer before calling intodrive_request().Moving to drain_timer_events() happens to fix a logic bug in theprevious caller of timer_expired(), which treated an error condition asif the timer were expired instead of bailing out.The previous implementation of timer_expired() gave differing resultsfor epoll and kqueue if the timer was reset. (For epoll, a reset timerwas considered to be expired, and for kqueue it was not.) This didn'tpreviously cause problems, since timer_expired() was only called whilethe timer was known to be set, but both implementations now use thekqueue logic.Reviewed-by: Thomas Munro <thomas.munro@gmail.com>Backpatch-through: 18Discussion:https://postgr.es/m/CAOYmi+nDZxJHaWj9_jRSyf8uMToCADAmOfJEggsKW-kY7aUwHA@mail.gmail.com1 parent16b0c48 commite507e08
1 file changed
+68
-40
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1536 | 1536 | | |
1537 | 1537 | | |
1538 | 1538 | | |
1539 | | - | |
1540 | | - | |
| 1539 | + | |
| 1540 | + | |
1541 | 1541 | | |
1542 | 1542 | | |
1543 | 1543 | | |
1544 | 1544 | | |
1545 | | - | |
1546 | | - | |
1547 | | - | |
1548 | | - | |
1549 | | - | |
1550 | | - | |
1551 | | - | |
1552 | | - | |
1553 | | - | |
1554 | | - | |
1555 | | - | |
1556 | | - | |
1557 | | - | |
1558 | | - | |
1559 | | - | |
1560 | | - | |
1561 | | - | |
1562 | | - | |
1563 | | - | |
1564 | | - | |
1565 | | - | |
| 1545 | + | |
1566 | 1546 | | |
1567 | 1547 | | |
1568 | | - | |
| 1548 | + | |
1569 | 1549 | | |
1570 | 1550 | | |
1571 | 1551 | | |
1572 | | - | |
| 1552 | + | |
1573 | 1553 | | |
1574 | 1554 | | |
1575 | 1555 | | |
| |||
1601 | 1581 | | |
1602 | 1582 | | |
1603 | 1583 | | |
| 1584 | + | |
| 1585 | + | |
| 1586 | + | |
| 1587 | + | |
| 1588 | + | |
| 1589 | + | |
| 1590 | + | |
| 1591 | + | |
| 1592 | + | |
| 1593 | + | |
| 1594 | + | |
| 1595 | + | |
| 1596 | + | |
| 1597 | + | |
| 1598 | + | |
| 1599 | + | |
| 1600 | + | |
| 1601 | + | |
| 1602 | + | |
| 1603 | + | |
| 1604 | + | |
| 1605 | + | |
| 1606 | + | |
| 1607 | + | |
| 1608 | + | |
| 1609 | + | |
| 1610 | + | |
| 1611 | + | |
| 1612 | + | |
| 1613 | + | |
1604 | 1614 | | |
1605 | 1615 | | |
1606 | 1616 | | |
| |||
2804 | 2814 | | |
2805 | 2815 | | |
2806 | 2816 | | |
| 2817 | + | |
| 2818 | + | |
| 2819 | + | |
| 2820 | + | |
| 2821 | + | |
| 2822 | + | |
| 2823 | + | |
| 2824 | + | |
| 2825 | + | |
| 2826 | + | |
| 2827 | + | |
| 2828 | + | |
| 2829 | + | |
| 2830 | + | |
| 2831 | + | |
| 2832 | + | |
2807 | 2833 | | |
2808 | 2834 | | |
2809 | 2835 | | |
| |||
2826 | 2852 | | |
2827 | 2853 | | |
2828 | 2854 | | |
2829 | | - | |
2830 | | - | |
2831 | | - | |
2832 | | - | |
2833 | | - | |
2834 | | - | |
2835 | | - | |
2836 | | - | |
2837 | 2855 | | |
2838 | | - | |
2839 | | - | |
2840 | | - | |
| 2856 | + | |
2841 | 2857 | | |
2842 | | - | |
2843 | | - | |
2844 | | - | |
| 2858 | + | |
| 2859 | + | |
| 2860 | + | |
| 2861 | + | |
| 2862 | + | |
| 2863 | + | |
| 2864 | + | |
| 2865 | + | |
2845 | 2866 | | |
2846 | | - | |
| 2867 | + | |
| 2868 | + | |
| 2869 | + | |
| 2870 | + | |
| 2871 | + | |
| 2872 | + | |
| 2873 | + | |
| 2874 | + | |
2847 | 2875 | | |
2848 | 2876 | | |
2849 | 2877 | | |
| |||
0 commit comments
Comments
(0)