diff options
author | Max Romanov <max.romanov@nginx.com> | 2021-07-20 10:37:53 +0300 |
---|---|---|
committer | Max Romanov <max.romanov@nginx.com> | 2021-07-20 10:37:53 +0300 |
commit | dfbdc1c11a201e46d61f4bc61cfbe5741fc4fd70 (patch) | |
tree | 04d09b2cd4abb1eaafc8aaa5bb1adbd42e3557a7 /test/test_php_targets.py | |
parent | 567545213d95e608b54ce92bfc33fac4327a9f93 (diff) | |
download | unit-dfbdc1c11a201e46d61f4bc61cfbe5741fc4fd70.tar.gz unit-dfbdc1c11a201e46d61f4bc61cfbe5741fc4fd70.tar.bz2 |
Python: fixing exceptions in Future.set_result for ASGI implementation.
An ASGI application can cancel the Future object returned by the receive()
call. In this case, Unit's ASGI implementation should not call set_result()
because the Future is already handled. In particular, the Starlette framework
was noted to cancel the received Future.
This patch adds a done() check for the Future before attempting a set_result().
This is related to #564 issue on GitHub.
Diffstat (limited to 'test/test_php_targets.py')
0 files changed, 0 insertions, 0 deletions