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()
240240 var poolTimedOut = false ;
241241 var inactivePoolIndex = - 1 ;
242242
243+ var timeoutsTests = 300 ;
243244 do
244245 {
245246 RedisClient inActiveClient ;
@@ -268,19 +269,27 @@ private async ValueTask<IRedisClientAsync> GetClientAsync()
268269 }
269270 }
270271
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 )
273274 {
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 ;
283277 }
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+ // }
284293 } while ( true ) ; // Just keep repeating until we get a
285294
286295 if ( poolTimedOut )
You can’t perform that action at this time.
0 commit comments