Fixed deprecated options in asyncio API for Python 3.10. Fixes #58.

This commit is contained in:
Mark Qvist 2022-05-25 23:11:01 +02:00
parent 94749e0dde
commit 9e316ab989
3 changed files with 10 additions and 4 deletions

View file

@ -85,6 +85,12 @@ class I2PController:
def start(self):
asyncio.set_event_loop(asyncio.new_event_loop())
self.loop = asyncio.get_event_loop()
RNS.log("Could not get event loop for "+str(self)+", waiting for event loop to appear", RNS.LOG_WARNING)
while self.loop == None:
self.loop = asyncio.get_event_loop()
sleep(0.25)
try:
self.loop.run_forever()
except Exception as e: