diff --git a/examples/esp8266/WebSocketClientOTA/python_ota_server/main.py b/examples/esp8266/WebSocketClientOTA/python_ota_server/main.py index 1c1c5b6..5d2750c 100644 --- a/examples/esp8266/WebSocketClientOTA/python_ota_server/main.py +++ b/examples/esp8266/WebSocketClientOTA/python_ota_server/main.py @@ -55,7 +55,7 @@ async def binary_send(websocket, fw_file): with open(fw_file, "rb") as binaryfile: while True: - chunk = binaryfile.read(2048) + chunk = binaryfile.read(4096) if not chunk: break try: @@ -63,7 +63,7 @@ async def binary_send(websocket, fw_file): except Exception as exception: Logger.exception(exception) return False - time.sleep(0.2) + asyncio.sleep(0.2) def version_checker(name, vdev, vapp):