Skip to content

Commit

Permalink
Merge pull request #207 from justmobilize/only-one-ssl-error
Browse files Browse the repository at this point in the history
Clearer error for only one SSL socket open at a time
  • Loading branch information
dhalbert authored May 24, 2024
2 parents deb2a5f + 30d73e0 commit 7bf8763
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion adafruit_esp32spi/adafruit_esp32spi.py
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ def socket_open(self, socket_num, dest, port, conn_mode=TCP_MODE):
if self._debug:
print("*** Open socket to", dest, port, conn_mode)
if conn_mode == ESP_SPIcontrol.TLS_MODE and self._tls_socket is not None:
raise OSError(23) # ENFILE - File table overflow
raise OSError(23, "Only one open SSL connection allowed")
port_param = struct.pack(">H", port)
if isinstance(dest, str): # use the 5 arg version
dest = bytes(dest, "utf-8")
Expand Down

0 comments on commit 7bf8763

Please sign in to comment.