File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -209,23 +209,22 @@ impl ConnectionPool {
209209 let index = self . round_robin % addresses. len ( ) ;
210210 let address = & addresses[ index] ;
211211
212- self . stats . client_waiting ( process_id, address. id ) ;
213-
214212 // Make sure you're getting a primary or a replica
215213 // as per request. If no specific role is requested, the first
216214 // available will be chosen.
217215 if address. role != role {
218- self . stats . client_disconnecting ( process_id, address. id ) ;
219216 continue ;
220217 }
221218
222219 allowed_attempts -= 1 ;
223220
224221 if self . is_banned ( address, shard, role) {
225- self . stats . client_disconnecting ( process_id, address. id ) ;
226222 continue ;
227223 }
228224
225+ // Indicate we're waiting on a server connection from a pool.
226+ self . stats . client_waiting ( process_id, address. id ) ;
227+
229228 // Check if we can connect
230229 let mut conn = match self . databases [ shard] [ index] . get ( ) . await {
231230 Ok ( conn) => conn,
You can’t perform that action at this time.
0 commit comments