This repository was archived by the owner on Dec 24, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +20
-11
lines changed Expand file tree Collapse file tree 1 file changed +20
-11
lines changed Original file line number Diff line number Diff line change @@ -240,6 +240,7 @@ private async ValueTask<IRedisClientAsync> GetClientAsync()
240
240
var poolTimedOut = false ;
241
241
var inactivePoolIndex = - 1 ;
242
242
243
+ var timeoutsTests = 300 ;
243
244
do
244
245
{
245
246
RedisClient inActiveClient ;
@@ -268,19 +269,27 @@ private async ValueTask<IRedisClientAsync> GetClientAsync()
268
269
}
269
270
}
270
271
271
- // Didn't get one, so let's wait a bit for a new one.
272
- if ( PoolTimeout . HasValue )
272
+ timeoutsTests -- ;
273
+ if ( timeoutsTests <= 0 )
273
274
{
274
- if ( ! await waitForWriter ( PoolTimeout . Value ) )
275
- {
276
- poolTimedOut = true ;
277
- break ;
278
- }
279
- }
280
- else
281
- {
282
- await waitForWriter ( RecheckPoolAfterMs ) ;
275
+ poolTimedOut = true ;
276
+ break ;
283
277
}
278
+ await Task . Delay ( 10 ) ;
279
+
280
+ // // Didn't get one, so let's wait a bit for a new one.
281
+ // if (PoolTimeout.HasValue)
282
+ // {
283
+ // if (!await waitForWriter(PoolTimeout.Value))
284
+ // {
285
+ // poolTimedOut = true;
286
+ // break;
287
+ // }
288
+ // }
289
+ // else
290
+ // {
291
+ // await waitForWriter(RecheckPoolAfterMs);
292
+ // }
284
293
} while ( true ) ; // Just keep repeating until we get a
285
294
286
295
if ( poolTimedOut )
You can’t perform that action at this time.
0 commit comments