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: