Remove unreachable socket buffering check code in connection (#710)

This commit is contained in:
J. Nick Koston 2023-11-25 09:06:28 -06:00 committed by GitHub
parent b7e319b26a
commit 2f49f804e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 8 deletions

View File

@ -291,14 +291,7 @@ class APIConnection:
sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
# Try to reduce the pressure on esphome device as it measures
# ram in bytes and we measure ram in megabytes.
try:
sock.setsockopt(socket.SOL_SOCKET, socket.SO_RCVBUF, BUFFER_SIZE)
except OSError as err:
_LOGGER.warning(
"%s: Failed to set socket receive buffer size: %s",
self.log_name,
err,
)
sock.setsockopt(socket.SOL_SOCKET, socket.SO_RCVBUF, BUFFER_SIZE)
if self._debug_enabled:
_LOGGER.debug(