Commit 3e2a59d
committed
synchronized with lua-nginx-module #c2940c1, #8edb21a, and #761ddca.
feature: added backlog queueing to cosocket connection pools.
Now we can pass 'pool_size' and 'backlog' options in connect method to
specify the pool size and the queue size of the connection pool.
When there is more connect operations than the pool_size, new connect
operation will be queued until former connect operation fails or
connection finalizes.
When there is more queueing connect operations than the backlog, new
connect operation will be dropped.
This pr also migrated connection pool creation to connect method. Note
that the meaning of `active_connections` is changed from the previous
setkeepalive mechanism. The connection pool is destroyed only if all
related connections closed now.
---
bugfix: only update connections count when cosockets are truly
associated with the socket pool.
---
bugfix: ensured we cleanup up aborted queued connect operations.
---
Thanks Zexuan Luo for the upstream patches.1 parent 2dcc28f commit 3e2a59d
File tree
2 files changed
+1056
-403
lines changed- src/subsys
2 files changed
+1056
-403
lines changed
0 commit comments