Fix trayicon compatibility with latest gevent

This commit is contained in:
shortcutme 2018-08-26 02:48:36 +02:00
parent 6783fb9010
commit 53a8c2d574
No known key found for this signature in database
GPG Key ID: 5B63BAE6CB9613AE
1 changed files with 1 additions and 1 deletions

View File

@ -64,7 +64,7 @@ class ActionsPlugin(object):
icon.clicked = lambda: self.opensite("http://%s:%s/%s" % (ui_ip, config.ui_port, config.homepage))
self.quit_servers_event = gevent.threadpool.ThreadResult(
lambda res: gevent.spawn_later(0.1, self.quitServers)
lambda res: gevent.spawn_later(0.1, self.quitServers), gevent.threadpool.get_hub(), lambda: True
) # Fix gevent thread switch error
gevent.threadpool.start_new_thread(icon._run, ()) # Start in real thread (not gevent compatible)
super(ActionsPlugin, self).main()