summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_service.h
diff options
context:
space:
mode:
authorMax Romanov <max.romanov@nginx.com>2017-09-05 15:56:35 -0700
committerMax Romanov <max.romanov@nginx.com>2017-09-05 15:56:35 -0700
commit0f9f0ca522fe2413d3bfb79f38c84eeaf84a17a4 (patch)
treed7c46ab179fb6e65daafc510b5a1f569736268ff /src/nxt_service.h
parentc937b8434ab603fa0d256f9fc29229bc76683301 (diff)
downloadunit-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