File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 44"""
55
66import logging
7+ import asyncio
78
89from .basetv import BaseTV
910from .. import constants
@@ -378,10 +379,12 @@ async def screen_on_awake_wake_lock_size(self):
378379
379380 # Power service might sometimes reply with "Failed to write while dumping service". If this happens,
380381 # retry the request, up to three times.
381- retries_left = 3
382+ retries_left = 20
382383 while output is not None and "Failed to write while dumping service" in output and retries_left > 0 :
383384 output = await self ._adb .shell (constants .CMD_SCREEN_ON_AWAKE_WAKE_LOCK_SIZE )
384385 retries_left -= 1
386+ if "Failed to write while dumping service" in output and retries_left > 0 :
387+ await asyncio .sleep (0.5 )
385388
386389 return self ._screen_on_awake_wake_lock_size (output )
387390
Original file line number Diff line number Diff line change @@ -378,7 +378,7 @@ def screen_on_awake_wake_lock_size(self):
378378
379379 # Power service might sometimes reply with "Failed to write while dumping service". If this happens,
380380 # retry the request, up to three times.
381- retries_left = 3
381+ retries_left = 20
382382 while output is not None and "Failed to write while dumping service" in output and retries_left > 0 :
383383 output = self ._adb .shell (constants .CMD_SCREEN_ON_AWAKE_WAKE_LOCK_SIZE )
384384 retries_left -= 1
You can’t perform that action at this time.
0 commit comments