examples/webrtc/signalling: Fix compatibility with Python 3.10

Fix asyncio throwing a deprecation warning when using
asyncio.get_event_loop().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3196>
This commit is contained in:
Sam Van Den Berge 2022-10-17 10:39:18 +02:00
parent 34ca46c786
commit 07d8e53aac
2 changed files with 2 additions and 2 deletions

View file

@ -98,7 +98,7 @@ async def hello():
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

View file

@ -78,7 +78,7 @@ async def hello():
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