mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
webrtc_sendrecv.py: Fix deprecation warning with Python 3.10
asyncio.get_event_loop() will not implicitly create a new event loop in a future version of Python, so we need to do that explicitly. ``` webrtc_sendrecv.py:188: DeprecationWarning: There is no current event loop loop = asyncio.get_event_loop() ``` Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1821>
This commit is contained in:
parent
4c2fd7f104
commit
e453e43e5a
1 changed files with 1 additions and 1 deletions
|
@ -185,7 +185,7 @@ if __name__ == '__main__':
|
|||
args = parser.parse_args()
|
||||
our_id = random.randrange(10, 10000)
|
||||
c = WebRTCClient(our_id, args.peerid, args.server)
|
||||
loop = asyncio.get_event_loop()
|
||||
loop = asyncio.new_event_loop()
|
||||
loop.run_until_complete(c.connect())
|
||||
res = loop.run_until_complete(c.loop())
|
||||
sys.exit(res)
|
||||
|
|
Loading…
Reference in a new issue