@@ -103,7 +103,6 @@ def __init__(self, host: str = "127.0.0.1", port: int | None = None) -> None:
103
103
self .log_queue : Queue [str | bytes | Type [ClientShutdown ]] | None = None
104
104
self .spillover : int = 0
105
105
self .verbose : bool = False
106
- self ._ready_event : asyncio .Event = asyncio .Event ()
107
106
108
107
async def connect (self ) -> None :
109
108
"""Connect to the devtools server.
@@ -124,6 +123,7 @@ async def connect(self) -> None:
124
123
125
124
log_queue = self .log_queue
126
125
websocket = self .websocket
126
+ ready_event = asyncio .Event ()
127
127
128
128
async def update_console () -> None :
129
129
"""Coroutine function scheduled as a Task, which listens on
@@ -141,7 +141,7 @@ async def update_console() -> None:
141
141
self .console .width = payload ["width" ]
142
142
self .console .height = payload ["height" ]
143
143
self .verbose = payload .get ("verbose" , False )
144
- self . _ready_event .set ()
144
+ ready_event .set ()
145
145
146
146
async def send_queued_logs ():
147
147
"""Coroutine function which is scheduled as a Task, which consumes
@@ -162,7 +162,7 @@ async def send_queued_logs():
162
162
async def server_info_received () -> None :
163
163
"""Wait for the first server info message to be received and handled."""
164
164
try :
165
- await asyncio .wait_for (self . _ready_event .wait (), timeout = READY_TIMEOUT )
165
+ await asyncio .wait_for (ready_event .wait (), timeout = READY_TIMEOUT )
166
166
except asyncio .TimeoutError :
167
167
return
168
168
0 commit comments