From b3c0df70c4b63dfc09d43cae33f48dbbfcc94b92 Mon Sep 17 00:00:00 2001 From: Ngai-Fung Yip Date: Mon, 22 Apr 2019 15:44:44 +0800 Subject: fix the compatible issue with gevent+dnspython --- websocket/_http.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/websocket/_http.py b/websocket/_http.py index 5b9a26d..c642c28 100644 --- a/websocket/_http.py +++ b/websocket/_http.py @@ -140,7 +140,7 @@ def _get_addrinfo_list(hostname, port, is_secure, proxy): try: if not phost: addrinfo_list = socket.getaddrinfo( - hostname, port, 0, 0, socket.SOL_TCP) + hostname, port, 0, socket.SOCK_STREAM, socket.SOL_TCP) return addrinfo_list, False, None else: pport = pport and pport or 80 -- cgit v1.2.1