diff options
author | Max Romanov <max.romanov@nginx.com> | 2017-09-05 15:56:35 -0700 |
---|---|---|
committer | Max Romanov <max.romanov@nginx.com> | 2017-09-05 15:56:35 -0700 |
commit | 0f9f0ca522fe2413d3bfb79f38c84eeaf84a17a4 (patch) | |
tree | d7c46ab179fb6e65daafc510b5a1f569736268ff /src/nxt_service.h | |
parent | c937b8434ab603fa0d256f9fc29229bc76683301 (diff) | |
download | unit-0f9f0ca522fe2413d3bfb79f38c84eeaf84a17a4.tar.gz unit-0f9f0ca522fe2413d3bfb79f38c84eeaf84a17a4.tar.bz2 |
Fixing racing condition on app port release/request.
Application free ports is a queue (double linked list) protected with mutex.
After successfull request parsing, each router thread (1) tries to get port
from this list. If this list is empty, (2) start worker request posted to main
router thread. Another thread may release port between (1) and (2).
This fix adds an attempt to get port from free ports list at the beginning of
start worker action in main thread.
Diffstat (limited to 'src/nxt_service.h')
0 files changed, 0 insertions, 0 deletions