Skip to content

Commit 6f74364

Browse files
committed
Remove lock release goto since it should not be released if releases is null (since it hasn't been acquired yet)
1 parent 5f9f82e commit 6f74364

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/Server/Services/GitLab/VersionCache.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public async Task RefreshAsync()
131131
);
132132

133133
if (releases is null)
134-
goto ReleaseLock;
134+
return;
135135

136136
await _semaphore.WaitAsync();
137137

@@ -175,8 +175,7 @@ public async Task RefreshAsync()
175175

176176
_logger.LogInformation("Loaded {entryCount} version cache entries for {project}; took {time}ms.", Count,
177177
_cachedProject!.Value.Name, sw.ElapsedMilliseconds);
178-
179-
ReleaseLock:
178+
180179
_semaphore.Release();
181180
}
182181

0 commit comments

Comments
 (0)