1
0
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:
david gauchard 2017-12-31 02:27:33 +01:00 committed by Ivan Grokhotkov
parent f9c60a226a
commit 9183366734

View File

@ -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()