mirror of
https://github.com/koush/scrypted.git
synced 2026-02-09 00:39:56 +00:00
server: fix dangling thread if glib main loop fails
This commit is contained in:
@@ -601,10 +601,11 @@ def plugin_main(readFd: int, writeFd: int):
|
||||
from gi.repository import GLib, Gst
|
||||
Gst.init(None)
|
||||
|
||||
worker = threading.Thread(target=main, args=(readFd, writeFd))
|
||||
loop = GLib.MainLoop()
|
||||
|
||||
worker = threading.Thread(target=main, args=(readFd, writeFd), name="asyncio-main")
|
||||
worker.start()
|
||||
|
||||
loop = GLib.MainLoop()
|
||||
loop.run()
|
||||
except:
|
||||
main(readFd, writeFd)
|
||||
|
||||
Reference in New Issue
Block a user