mirror of
https://github.com/esphome/esphome.git
synced 2025-02-15 09:28:16 +00:00
[ota] Increase socket timeout earlier in OTA script (#8129)
This commit is contained in:
parent
1ab1768b6a
commit
8be9f02693
@ -249,6 +249,9 @@ def perform_ota(
|
||||
send_check(sock, result, "auth result")
|
||||
receive_exactly(sock, 1, "auth result", RESPONSE_AUTH_OK)
|
||||
|
||||
# Set higher timeout during upload
|
||||
sock.settimeout(30.0)
|
||||
|
||||
upload_size = len(upload_contents)
|
||||
upload_size_encoded = [
|
||||
(upload_size >> 24) & 0xFF,
|
||||
@ -271,8 +274,6 @@ def perform_ota(
|
||||
# show the actual progress
|
||||
|
||||
sock.setsockopt(socket.SOL_SOCKET, socket.SO_SNDBUF, UPLOAD_BUFFER_SIZE)
|
||||
# Set higher timeout during upload
|
||||
sock.settimeout(30.0)
|
||||
start_time = time.perf_counter()
|
||||
|
||||
offset = 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user