Fix asyncio throwing a deprecation warning when using
asyncio.get_event_loop().
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3196>
print('Our uid is {!r}'.format(PEER_ID))
try:
- asyncio.get_event_loop().run_until_complete(hello())
+ asyncio.run(hello())
except websockets.exceptions.InvalidHandshake:
print('Invalid handshake: are you sure this is a websockets server?\n')
raise
print('Our uid is {!r}'.format(PEER_ID))
try:
- asyncio.get_event_loop().run_until_complete(hello())
+ asyncio.run(hello())
except websockets.exceptions.InvalidHandshake:
print('Invalid handshake: are you sure this is a websockets server?\n')
raise