File tree 1 file changed +3
-4
lines changed
1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -209,23 +209,22 @@ impl ConnectionPool {
209
209
let index = self . round_robin % addresses. len ( ) ;
210
210
let address = & addresses[ index] ;
211
211
212
- self . stats . client_waiting ( process_id, address. id ) ;
213
-
214
212
// Make sure you're getting a primary or a replica
215
213
// as per request. If no specific role is requested, the first
216
214
// available will be chosen.
217
215
if address. role != role {
218
- self . stats . client_disconnecting ( process_id, address. id ) ;
219
216
continue ;
220
217
}
221
218
222
219
allowed_attempts -= 1 ;
223
220
224
221
if self . is_banned ( address, shard, role) {
225
- self . stats . client_disconnecting ( process_id, address. id ) ;
226
222
continue ;
227
223
}
228
224
225
+ // Indicate we're waiting on a server connection from a pool.
226
+ self . stats . client_waiting ( process_id, address. id ) ;
227
+
229
228
// Check if we can connect
230
229
let mut conn = match self . databases [ shard] [ index] . get ( ) . await {
231
230
Ok ( conn) => conn,
You can’t perform that action at this time.
0 commit comments