mirror of
https://github.com/esphome/esphome.git
synced 2025-10-17 17:23:45 +01:00
[ota] Increase handshake timeout to 20s now that auth is non-blocking
This commit is contained in:
@@ -29,7 +29,7 @@ namespace esphome {
|
||||
static const char *const TAG = "esphome.ota";
|
||||
static constexpr uint16_t OTA_BLOCK_SIZE = 8192;
|
||||
static constexpr size_t OTA_BUFFER_SIZE = 1024; // buffer size for OTA data transfer
|
||||
static constexpr uint32_t OTA_SOCKET_TIMEOUT_HANDSHAKE = 10000; // milliseconds for initial handshake
|
||||
static constexpr uint32_t OTA_SOCKET_TIMEOUT_HANDSHAKE = 20000; // milliseconds for initial handshake
|
||||
static constexpr uint32_t OTA_SOCKET_TIMEOUT_DATA = 90000; // milliseconds for data transfer
|
||||
|
||||
#ifdef USE_OTA_PASSWORD
|
||||
|
@@ -410,7 +410,7 @@ def run_ota_impl_(
|
||||
af, socktype, _, _, sa = r
|
||||
_LOGGER.info("Connecting to %s port %s...", sa[0], sa[1])
|
||||
sock = socket.socket(af, socktype)
|
||||
sock.settimeout(10.0)
|
||||
sock.settimeout(20.0)
|
||||
try:
|
||||
sock.connect(sa)
|
||||
except OSError as err:
|
||||
|
Reference in New Issue
Block a user