From e9f610383da9f03dc9f30c5dae6b721712822ab0 Mon Sep 17 00:00:00 2001 From: Bret Ambrose Date: Tue, 7 Dec 2021 11:37:15 -0800 Subject: [PATCH] Use conditional accessor to get socket object --- AWSIoTPythonSDK/core/protocol/paho/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AWSIoTPythonSDK/core/protocol/paho/client.py b/AWSIoTPythonSDK/core/protocol/paho/client.py index ca530c8..4216829 100755 --- a/AWSIoTPythonSDK/core/protocol/paho/client.py +++ b/AWSIoTPythonSDK/core/protocol/paho/client.py @@ -880,7 +880,7 @@ def loop(self, timeout=1.0, max_packets=1): # used to check if there are any bytes left in the ssl socket pending_bytes = 0 if self._ssl: - pending_bytes = self._ssl.pending() + pending_bytes = self.socket().pending() # if bytes are pending do not wait in select if pending_bytes > 0: