[New-bugs-announce] [issue33837] Closing asyncio.Server on asyncio.ProactorEventLoop causes all active servers to stop listening

Martin Liska report at bugs.python.org
Mon Jun 11 11:59:40 EDT 2018


New submission from Martin Liska <juggzor at gmail.com>:

When calling asyncio.Server.close, the method calls asyncio.AbstractEventLoop._stop_serving for each of its sockets in turn.

The implementation of this method in asyncio.ProactorEventLoop calls the _stop_accept_futures method which seems to cancel "accept" futures of all sockets running on the loop, not just the one that was supposed to be stopped. This means that closing one server closes sockets of all existing servers.

With asyncio.SelectorEventLoop there is no such issue.

----------
components: asyncio
messages: 319311
nosy: asvetlov, mliska, yselivanov
priority: normal
severity: normal
status: open
title: Closing asyncio.Server on asyncio.ProactorEventLoop causes all active servers to stop listening
type: behavior
versions: Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33837>
_______________________________________


More information about the New-bugs-announce mailing list