Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix dangling socket causing uvicorn shutdown failure
When using urllib3<=1.26.18 with uvicorn<=0.23.2 and python>=3.12, the socket shutdown method of urllib3 combines with the uvicorn server shutdown to leave the server stuck for many seconds: encode/uvicorn#2145 Updating urllib3 or uvicorn (or downgrading Python) fixes the bug, but Fedora 39 shipped Python 3.12 with old urllib3 and uvicorn. Since we (sadly) open a connection just for a single request every time, we can disable the HTTP keep-alive. This allows the server to close the connection earlier, without waiting for the client. This fixes the failing tests/system/test_astacus.py::test_astacus on Fedora 39.
- Loading branch information