Skip to content

change append to extend to fix bytestream error #302

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 3, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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