Skip to content

Commit 103fda2

Browse files
committed
fix connection.close raising errors on python 3.8
1 parent 7d12b7f commit 103fda2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

anki_vector/connection.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -611,6 +611,9 @@ async def play_animation():
611611
"""
612612
if self._control_events:
613613
self._control_events.shutdown()
614+
# need to wait until all Futures were cancled before going on,
615+
# otherwise python 3.8+ will raise alot of CancelledErrors and
616+
time.sleep(2)
614617
if self._control_stream_task:
615618
self._control_stream_task.cancel()
616619
self.run_coroutine(self._control_stream_task).result()

0 commit comments

Comments
 (0)