diff options
Diffstat (limited to 'extmod/uasyncio/stream.py')
-rw-r--r-- | extmod/uasyncio/stream.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/extmod/uasyncio/stream.py b/extmod/uasyncio/stream.py index 8de2d2599..af3b8feab 100644 --- a/extmod/uasyncio/stream.py +++ b/extmod/uasyncio/stream.py @@ -79,8 +79,8 @@ async def open_connection(host, port): from uerrno import EINPROGRESS import usocket as socket - ai = socket.getaddrinfo(host, port)[0] # TODO this is blocking! - s = socket.socket() + ai = socket.getaddrinfo(host, port, 0, socket.SOCK_STREAM)[0] # TODO this is blocking! + s = socket.socket(ai[0], ai[1], ai[2]) s.setblocking(False) ss = Stream(s) try: |