Skip to content

asyncio ipv6 localhost bug in python3.7+3.8 #2

@lemoer

Description

@lemoer

There is a bug in python3.7 and python3.8, which affects pynet:

This patch fixes it:

--- /usr/lib/python3.7/asyncio/base_events.py.bak	2019-02-21 18:42:17.060122277 +0100
+++ /usr/lib/python3.7/asyncio/base_events.py	2019-02-21 18:49:36.886866750 +0100
@@ -942,8 +942,8 @@
                             sock = None
                             continue
                     if self._debug:
-                        logger.debug("connect %r to %r", sock, address)
-                    await self.sock_connect(sock, address)
+                        logger.debug("connect %r to %r", sock, (host, port))
+                    await self.sock_connect(sock, (host, port))
                 except OSError as exc:
                     if sock is not None:
                         sock.close()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions