forked from platypush/platypush
Don't join self._thread on stop in RunnablePlugin if self._thread = current_thread
This commit is contained in:
parent
31552963c4
commit
4a8da80c7c
1 changed files with 5 additions and 1 deletions
|
@ -126,7 +126,11 @@ class RunnablePlugin(Plugin):
|
||||||
Stop the plugin.
|
Stop the plugin.
|
||||||
"""
|
"""
|
||||||
self._should_stop.set()
|
self._should_stop.set()
|
||||||
if self._thread and self._thread.is_alive():
|
if (
|
||||||
|
self._thread
|
||||||
|
and self._thread != threading.current_thread()
|
||||||
|
and self._thread.is_alive()
|
||||||
|
):
|
||||||
self.logger.info('Waiting for the plugin to stop')
|
self.logger.info('Waiting for the plugin to stop')
|
||||||
try:
|
try:
|
||||||
if self._thread:
|
if self._thread:
|
||||||
|
|
Loading…
Reference in a new issue