Assign the recursive output of _thread_func to response to make sure that the latest response is always returned - that means the successful response in case the previous one was a failure

This commit is contained in:
Fabio Manganiello 2018-04-22 21:26:53 +02:00
parent 60c9c7476e
commit 6ef97e9ddc

View file

@ -197,8 +197,7 @@ class Request(Message):
if n_tries: if n_tries:
logging.info('Reloading plugin {} and retrying'.format(module_name)) logging.info('Reloading plugin {} and retrying'.format(module_name))
get_plugin(module_name, reload=True) get_plugin(module_name, reload=True)
_thread_func(n_tries-1) response = _thread_func(n_tries-1)
return
finally: finally:
self._send_response(response) self._send_response(response)
return response return response