mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-24 00:29:35 -05:00
Round-robin for upstream connections
This commit is contained in:
parent
58a880bc7b
commit
e65cd38787
1 changed files with 7 additions and 0 deletions
|
|
@ -128,9 +128,16 @@ backend_select( Operation *op )
|
|||
"selected connection %lu for client %lu msgid=%d\n",
|
||||
c->c_connid, op->o_client_connid, op->o_client_msgid );
|
||||
|
||||
/*
|
||||
* Round-robin step:
|
||||
* Rotate the queue to put this connection at the end.
|
||||
*/
|
||||
LDAP_CIRCLEQ_MAKE_TAIL( head, c, c_next );
|
||||
|
||||
b->b_n_ops_executing++;
|
||||
c->c_n_ops_executing++;
|
||||
CONNECTION_UNLOCK_INCREF(c);
|
||||
|
||||
ldap_pvt_thread_mutex_unlock( &b->b_mutex );
|
||||
return c;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue