Skip to content

Commit

Permalink
change append to extend to fix bytestream error
Browse files Browse the repository at this point in the history
  • Loading branch information
jmklix committed Feb 17, 2022
1 parent 90d7b05 commit dd4a464
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions AWSIoTPythonSDK/core/greengrass/discovery/providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def discover(self, thingName):
"""
**Description**
Perform the discovery request for the given Greengrass aware device thing name.
**Syntax**
Expand Down Expand Up @@ -246,9 +246,9 @@ def _create_tcp_connection(self):

def _create_ssl_connection(self, sock):
self._logger.debug("Creating ssl connection...")

ssl_protocol_version = ssl.PROTOCOL_SSLv23

if self._port == 443:
ssl_context = SSLContextBuilder()\
.with_ca_certs(self._ca_path)\
Expand Down Expand Up @@ -368,7 +368,7 @@ def _receive_until(self, ssl_sock, criteria_function, extra_data=None):
number_bytes_read = 0
while True: # Python does not have do-while
try:
response.append(self._convert_to_int_py3(ssl_sock.read(1)))
response.extend(self._convert_to_int_py3(ssl_sock.read(1)))
number_bytes_read += 1
except socket.error as err:
if err.errno == ssl.SSL_ERROR_WANT_READ or err.errno == ssl.SSL_ERROR_WANT_WRITE:
Expand Down

0 comments on commit dd4a464

Please sign in to comment.