7e091ba7be
Without timeout_graceful_shutdown, uvicorn's shutdown() waits indefinitely for open connections to close. The SSE reconnection tests in test_streamable_http.py can leave streams open at fixture teardown, so the 5s thread.join times out and abandons the thread mid-shutdown. On Windows Proactor, the abandoned connection transports still have pending Overlapped Recv operations when the event loop is torn down. GC later finds them during an unrelated test, surfacing as PytestUnraisableExceptionWarning. Previously hidden by subprocess isolation. timeout_graceful_shutdown=1 gives uvicorn a bounded window to drain connections, then cancels remaining tasks via asyncio — transports unwind through CancelledError instead of being abandoned.