Skip to content
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

Update comments specific to networking modules #217

Merged
merged 1 commit into from
May 21, 2024
Merged
Changes from all commits
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
6 changes: 3 additions & 3 deletions adafruit_minimqtt/adafruit_minimqtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -996,7 +996,7 @@ def _wait_for_msg(self, timeout: Optional[float] = None) -> Optional[int]:
res = self._sock_exact_recv(1)
except self._socket_pool.timeout:
return None
else: # socketpool, esp32spi
else: # socketpool, esp32spi, wiznet5k
try:
res = self._sock_exact_recv(1, timeout=timeout)
except OSError as error:
Expand Down Expand Up @@ -1085,7 +1085,7 @@ def _sock_exact_recv(
"""
stamp = self.get_monotonic_time()
if not self._backwards_compatible_sock:
# CPython/Socketpool Impl.
# CPython, socketpool, esp32spi, wiznet5k
rc = bytearray(bufsize)
mv = memoryview(rc)
recv_len = self._sock.recv_into(rc, bufsize)
Expand All @@ -1102,7 +1102,7 @@ def _sock_exact_recv(
raise MMQTTException(
f"Unable to receive {to_read} bytes within {read_timeout} seconds."
)
else: # ESP32SPI Impl.
else: # Legacy: fona, esp_atcontrol
# This will time out with socket timeout (not receive timeout).
rc = self._sock.recv(bufsize)
if not rc:
Expand Down
Loading