mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-27 21:16:50 +03:00
fix IDE's OTA when using MSS != 1460
This commit is contained in:
parent
f9c60a226a
commit
9183366734
@ -171,10 +171,14 @@ def serve(remoteAddr, localAddr, remotePort, localPort, password, filename, comm
|
||||
|
||||
sys.stderr.write('\n')
|
||||
logging.info('Waiting for result...')
|
||||
# libraries/ArduinoOTA/ArduinoOTA.cpp L311 L320
|
||||
# only sends digits or 'OK'. We must not not close
|
||||
# the connection before receiving the 'O' of 'OK'
|
||||
try:
|
||||
connection.settimeout(60)
|
||||
data = connection.recv(32).decode()
|
||||
logging.info('Result: %s' ,data)
|
||||
while True:
|
||||
if connection.recv(32).decode().find('O') >= 0: break
|
||||
logging.info('Result: OK')
|
||||
connection.close()
|
||||
f.close()
|
||||
sock.close()
|
||||
|
Loading…
x
Reference in New Issue
Block a user