Skip to content

Conversation

@Megabytemb
Copy link
Contributor

Overview

The RetryHandler previously used time.sleep(delay) to pause between retries. However, time.sleep is a blocking call and can halt the entire async event loop, which negatively impacts asynchronous applications like FastAPI.

This PR replaces time.sleep(delay) with await asyncio.sleep(delay), ensuring that the sleep is non-blocking and the event loop remains responsive during retry delays. This change improves compatibility and performance in asynchronous environments.

Related Issue

N.A

Demo

N.A

Notes

N.A

Testing Instructions

All existing Tests pass

@Megabytemb Megabytemb requested a review from a team as a code owner July 17, 2025 08:40
@sonarqubecloud
Copy link

Copy link
Member

@baywet baywet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the contribution!

@github-project-automation github-project-automation bot moved this to In Progress 🚧 in Kiota Jul 18, 2025
@baywet baywet enabled auto-merge July 18, 2025 12:02
@baywet baywet merged commit 6fa6ca5 into microsoft:main Jul 18, 2025
52 checks passed
@github-project-automation github-project-automation bot moved this from In Progress 🚧 to Done ✔️ in Kiota Jul 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants