Skip to content

Commit

Permalink
Fix InteractionServiceHandler semaphore isReady check
Browse files Browse the repository at this point in the history
Co-authored-by: Filip55561 <[email protected]>
  • Loading branch information
HEJOK254 committed Nov 1, 2024
1 parent 7a1e6d5 commit c013191
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Commands/InteractionServiceHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,11 @@ private async Task InitAsync()
{
await _initSemaphore.WaitAsync();

// Prevent re-initialization
if (isReady)
return;

try
{
// Prevent re-initialization
if (isReady) return;

_interactionService = new InteractionService(_client.Rest, _interactionServiceConfig);
await RegisterModulesAsync();

Expand Down

0 comments on commit c013191

Please sign in to comment.