mqtt: fix tls for version 2.0+ clients
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
1 file changed
+6
-1
@@ -217,7 +217,12 @@ class ExtPahoClient(paho_mqtt.Client):
|
||||
if not self.suppress_exceptions:
|
||||
raise
|
||||
|
||||
self._sock = sock or self._create_socket() # type: ignore
|
||||
if sock is None:
|
||||
self._sock = self._create_socket() # type: ignore
|
||||
elif self._ssl:
|
||||
self._sock = self._ssl_wrap_socket(sock)
|
||||
else:
|
||||
self._sock = sock # type: ignore
|
||||
|
||||
self._sock.setblocking(False) # type: ignore[attr-defined]
|
||||
self._registered_write = False
|
||||
|
||||
Reference in new issue
Block a user