]> granicus.if.org Git - python/commit
[3.6] bpo-33263: Fix FD leak in _SelectorSocketTransport (GH-6450) (#7025)
authorAndrew Svetlov <andrew.svetlov@gmail.com>
Mon, 21 May 2018 10:09:49 +0000 (13:09 +0300)
committerGitHub <noreply@github.com>
Mon, 21 May 2018 10:09:49 +0000 (13:09 +0300)
commit7208bfb64b74f31f9704be3f01f26861c9cf092b
treef4cb07fe68e396e5e37a7de397b0c63e89ee4d9e
parent983e9653e0584b65a6ec66543ce1631f888aa285
[3.6] bpo-33263: Fix FD leak in _SelectorSocketTransport (GH-6450) (#7025)

* bpo-33263 Fix FD leak in _SelectorSocketTransport. (GH-6450)

Under particular circumstances _SelectorSocketTransport can try to add a reader
even the transport is already being closed. This can lead to FD leak and
invalid stated of the following connections. Fixed the SelectorSocketTransport
to add the reader only if the trasport is still active..
(cherry picked from commit a84d0b361a26c05c6fadc6640591ec3feee5bfb5)
Lib/asyncio/selector_events.py
Lib/test/test_asyncio/test_selector_events.py
Misc/NEWS.d/next/Library/2018-04-11-20-29-19.bpo-33263.B56Hc1.rst [new file with mode: 0644]