Skip to content

Commit 808410d

Browse files
XmasApplerekby
authored andcommitted
Add leave condition to getSession retryer
1 parent 1264518 commit 808410d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Ydb.Sdk/src/Services/Table/SessionPool.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ public async Task<GetSessionResponse> GetSession()
9898
for (var attempt = 0; attempt < maxAttempts; attempt++)
9999
{
100100
getSessionResponse = await GetSessionAttempt();
101+
if (getSessionResponse.Status.IsSuccess) return getSessionResponse;
101102
}
102103

103104
_logger.LogError($"Failed to get session from pool or create it (attempts: {maxAttempts})");

0 commit comments

Comments
 (0)