Commit 31ebbd8
committed
⚡ Optimize simple-auth-client by making wait_for_callback async
What: Modified CallbackServer.wait_for_callback in mcp_simple_auth_client/main.py to be an async function, utilizing await asyncio.sleep(0.1) instead of the blocking time.sleep(0.1). The call in callback_handler was also updated to await this execution.
Why: The previous implementation used the blocking time.sleep, which stalled the asyncio event loop and delayed other background coroutines running concurrently, making the application unresponsive during the waiting period.
Measured Improvement:
Baseline: Max event loop delay was measured at ~0.910s when simulating a 1s wait.
After fix: Event loop remained fully responsive (Max delay 0.000s) during the wait period.1 parent 58349ba commit 31ebbd8
0 file changed
0 commit comments