Tribler / tribler

Privacy enhanced BitTorrent client with P2P content discovery
https://www.tribler.org
GNU General Public License v3.0
4.74k stars 445 forks source link

Fixes #7972: UDP server stops accepting datagrams from any clients after a single client disconnects #7976

Closed kozlovsky closed 2 months ago

kozlovsky commented 2 months ago

This PR fixes #7972. This is a backport of https://github.com/python/cpython/pull/32011.

You can add the following two lines to the server.py example from #7972 and check that it works as expected with multiple clients:

from tribler.core.utilities.asyncio_fixes import proactor_recvfrom_patch
proactor_recvfrom_patch.apply_proactor_recvfrom_patch()