From e453e43e5a91f66ca872118d1301c3d4189a3675 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Tue, 1 Mar 2022 19:53:41 +0530 Subject: [PATCH] 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: --- subprojects/gst-examples/webrtc/sendrecv/gst/webrtc_sendrecv.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subprojects/gst-examples/webrtc/sendrecv/gst/webrtc_sendrecv.py b/subprojects/gst-examples/webrtc/sendrecv/gst/webrtc_sendrecv.py index 9e33f885cf..e66fc1fe63 100644 --- a/subprojects/gst-examples/webrtc/sendrecv/gst/webrtc_sendrecv.py +++ b/subprojects/gst-examples/webrtc/sendrecv/gst/webrtc_sendrecv.py @@ -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)