Commit 282be2a
committed
fix: treat a zero pool idle timeout as no pooling at all
AWS_LWA_POOL_IDLE_TIMEOUT_SECONDS=0 asks for no keep-alive, but passing
Duration::ZERO to hyper does not deliver it: expiry is decided lazily at
checkout via saturating_duration_since(idle_at) > timeout, and hyper skips
spawning its idle-eviction task entirely for a zero timeout. The socket is
therefore parked after the response and only dropped when the next checkout
evicts it — a file descriptor held open for a connection no request may reuse.
build_client now maps a zero idle timeout onto the same pool_max_idle_per_host(0)
that Pooling::Disabled uses, so the connection is dropped as the response
completes. Documented in the README and guide env-var tables, which did not
mention the value before.1 parent 9484cef commit 282be2a
4 files changed
Lines changed: 29 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
827 | 827 | | |
828 | 828 | | |
829 | 829 | | |
830 | | - | |
831 | | - | |
832 | | - | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
833 | 837 | | |
834 | 838 | | |
835 | 839 | | |
836 | 840 | | |
837 | 841 | | |
838 | 842 | | |
839 | | - | |
| 843 | + | |
840 | 844 | | |
841 | 845 | | |
842 | 846 | | |
| |||
1748 | 1752 | | |
1749 | 1753 | | |
1750 | 1754 | | |
1751 | | - | |
| 1755 | + | |
| 1756 | + | |
1752 | 1757 | | |
1753 | 1758 | | |
1754 | 1759 | | |
| |||
1931 | 1936 | | |
1932 | 1937 | | |
1933 | 1938 | | |
| 1939 | + | |
| 1940 | + | |
| 1941 | + | |
| 1942 | + | |
| 1943 | + | |
| 1944 | + | |
| 1945 | + | |
| 1946 | + | |
| 1947 | + | |
| 1948 | + | |
| 1949 | + | |
| 1950 | + | |
| 1951 | + | |
| 1952 | + | |
1934 | 1953 | | |
1935 | 1954 | | |
1936 | 1955 | | |
| |||
0 commit comments