Skip to content

Commit 90529c3

Browse files
committed
fix: RedisSessionStorage의 CS1998 경고 수정
GetActiveSessionCountAsync 메서드에서 불필요한 async 키워드 제거 - async 키워드 제거 및 Task.FromResult() 사용 - 실제 비동기 작업이 없는 메서드의 올바른 패턴 적용 - CS1998 컴파일러 경고 해결
1 parent a1364dd commit 90529c3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ProjectVG.Infrastructure/Persistence/Session/RedisSessionStorage.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ public async Task<bool> ExistsAsync(string sessionId)
156156
}
157157
}
158158

159-
public async Task<int> GetActiveSessionCountAsync()
159+
public Task<int> GetActiveSessionCountAsync()
160160
{
161161
try
162162
{
@@ -165,12 +165,12 @@ public async Task<int> GetActiveSessionCountAsync()
165165
var count = keys.Count();
166166

167167
_logger.LogDebug("활성 세션 수: {Count}", count);
168-
return count;
168+
return Task.FromResult(count);
169169
}
170170
catch (Exception ex)
171171
{
172172
_logger.LogError(ex, "활성 세션 수 조회 실패");
173-
return 0;
173+
return Task.FromResult(0);
174174
}
175175
}
176176

0 commit comments

Comments
 (0)