File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -203,12 +203,14 @@ def __init__(
203203 @property
204204 def started (self ) -> bool :
205205 """Check if the instance has started."""
206+ running_future = self .engine .running_future
206207 return bool (
207208 not self .done
208- and self .engine .running_future
209- and self .engine .running_future .done ()
210- and not self .engine .running_future .cancelled ()
211- and not self .engine .running_future .exception ()
209+ and running_future
210+ and running_future .done ()
211+ and not running_future .cancelled ()
212+ and not running_future .exception ()
213+ and running_future .result ()
212214 )
213215
214216 def start (self ) -> None :
@@ -247,6 +249,7 @@ async def async_wait_for_start(self) -> None:
247249 not self .engine .running_future .done ()
248250 or self .engine .running_future .cancelled ()
249251 or self .engine .running_future .exception ()
252+ or not self .engine .running_future .result ()
250253 or self .done
251254 ):
252255 raise NotRunningException
You can’t perform that action at this time.
0 commit comments