Skip to content
Snippets Groups Projects
Commit 21dcf57b authored by rswindell's avatar rswindell
Browse files

Fix race-condition during shutdown or recycle that could cause crash:

active_clients (protected integer) could be 0 at the time of recycle because
there can be delay at the beginning of the FTP ctrl thread (e.g. looking up
filtered IPs/hostnames) before the active_clients is incremented which could
be during/after it was destroyed by the cleanup() function. Now tracking
number of threads using protected integer which increments immediately upon
child thread creation and is not destroyed until the main thread terminates.
There is currently *not* timeout while waiting for child threads to terminate
upon shutdown/recycle, so this could result in a hung server thread if a child
thread is indefinitely hung - consider using a timeout.
parent d0230054
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment