Skip to content

Conversation

@hamzamahmood
Copy link
Collaborator

What

  • Applied ConfigureAwait(false) to await calls in async methods.
  • Ensured proper async handling to prevent UI or request thread blocking.

Why

  • Calling async methods from synchronous code without ConfigureAwait(false) can cause deadlocks, especially in UI or ASP.NET applications.
  • This fix ensures that awaited tasks do not attempt to resume execution on the original synchronization context, preventing the client from freezing.

Type of change

Select multiple if applicable.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause a breaking change)
  • Tests (adds or updates tests)
  • Documentation (adds or updates documentation)
  • Refactor (style improvements, performance improvements, code refactoring)
  • Revert (reverts a commit)
  • CI/Build (adds or updates a script, change in external dependencies)

Testing

The fix was tested using a C# client generated from an ASP.NET Web App targeting .NET Framework 4.8.

- Added `ConfigureAwait(false)` to `await` calls in async methods to prevent deadlocks.
@hamzamahmood hamzamahmood added the bug Something isn't working label Feb 27, 2025
@hamzamahmood hamzamahmood self-assigned this Feb 27, 2025
@sonarqubecloud
Copy link

@hamzamahmood hamzamahmood merged commit 04ae615 into main Feb 27, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants