From 6ef97e9ddc660c2c3b7eb1526b1ce7e32498284d Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Sun, 22 Apr 2018 21:26:53 +0200 Subject: [PATCH] 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 --- platypush/message/request/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/platypush/message/request/__init__.py b/platypush/message/request/__init__.py index d1c7da99e..e8863263c 100644 --- a/platypush/message/request/__init__.py +++ b/platypush/message/request/__init__.py @@ -197,8 +197,7 @@ class Request(Message): if n_tries: logging.info('Reloading plugin {} and retrying'.format(module_name)) get_plugin(module_name, reload=True) - _thread_func(n_tries-1) - return + response = _thread_func(n_tries-1) finally: self._send_response(response) return response