Skip to content

Commit 32c4f88

Browse files
committed
smaller buffer size for file read to send as HTTPResponse.
1 parent 8f31605 commit 32c4f88

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adafruit_httpserver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ def _send_file_response(self, conn, filename, root, file_length):
244244
),
245245
)
246246
with open(root + filename, "rb") as file:
247-
while bytes_read := file.read(8192):
247+
while bytes_read := file.read(2048):
248248
self._send_bytes(conn, bytes_read)
249249

250250
def _send_bytes(self, conn, buf): # pylint: disable=no-self-use

0 commit comments

Comments
 (0)