]> granicus.if.org Git - python/commit
bpo-33263: Fix FD leak in _SelectorSocketTransport (GH-6450) (#7022)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 21 May 2018 08:35:25 +0000 (01:35 -0700)
committerAndrew Svetlov <andrew.svetlov@gmail.com>
Mon, 21 May 2018 08:35:25 +0000 (11:35 +0300)
commitb8b800090ff0954117a26ffcb501307823f3d33a
tree03ca8b83e41d0031a23ff209697fe28105bac5b8
parent4ecdc1110df211686a4406ba666a7f8106e0f618
bpo-33263: Fix FD leak in _SelectorSocketTransport (GH-6450) (#7022)

* 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)

Co-authored-by: Vlad Starostin <drtyrsa@yandex.ru>
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]