diff --git a/src/anyio/_backends/_selector_thread.py b/src/anyio/_backends/_selector_thread.py index 7bc2c7dd..10635fe1 100644 --- a/src/anyio/_backends/_selector_thread.py +++ b/src/anyio/_backends/_selector_thread.py @@ -309,6 +309,7 @@ def _close_selector_and_loop() -> None: asyncio_loop.close = loop_close # type: ignore[method-assign] _selectors.pop(asyncio_loop, None) selector_thread.close() + asyncio_loop.close() asyncio_loop.close = _close_selector_and_loop # type: ignore[method-assign] diff --git a/tests/test_sockets.py b/tests/test_sockets.py index 971b1f2a..0e0f794e 100644 --- a/tests/test_sockets.py +++ b/tests/test_sockets.py @@ -1853,9 +1853,6 @@ async def test_connect_tcp_getaddrinfo_context() -> None: async def test_wait_socket_readable(anyio_backend_name: str) -> None: - if anyio_backend_name == "trio" and platform.system() == "Windows": - pytest.skip("Internal error in Trio") - def client(port: int) -> None: with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock: sock.connect(("127.0.0.1", port))