diff --git a/uwebsockets/client.py b/uwebsockets/client.py index 42a5a54..27bacd2 100644 --- a/uwebsockets/client.py +++ b/uwebsockets/client.py @@ -9,7 +9,7 @@ import usocket as socket import ubinascii as binascii import urandom as random -import ussl +import ssl from .protocol import Websocket, urlparse @@ -34,7 +34,7 @@ def connect(uri): addr = socket.getaddrinfo(uri.hostname, uri.port) sock.connect(addr[0][4]) if uri.protocol == 'wss': - sock = ussl.wrap_socket(sock, server_hostname=uri.hostname) + sock = ssl.wrap_socket(sock, server_hostname=uri.hostname) def send_header(header, *args): if __debug__: LOGGER.debug(str(header), *args)