Due to the code that resets the port usage count on pool startup, the port count can be wrong on pools running multiple pool modules. To correct this, the port count should not be reset when starting up the pool and termination signals should be caught and should reduce port usage for all connections to that leaf node. This will still cause a problem if SIGKILL is sent.
Alternatively, refactor the code that counts connections per port so that old connections are cleared no matter if the pool module closes gracefully or forcibly.
Due to the code that resets the port usage count on pool startup, the port count can be wrong on pools running multiple pool modules. To correct this, the port count should not be reset when starting up the pool and termination signals should be caught and should reduce port usage for all connections to that leaf node. This will still cause a problem if SIGKILL is sent.
Alternatively, refactor the code that counts connections per port so that old connections are cleared no matter if the pool module closes gracefully or forcibly.