Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: don't close used mock agent (#170)
avoid ClientDestroyedError ```bash ClientDestroyedError: The client is destroyed at Agent.dispatch (node_modules/undici/lib/dispatcher-base.js:172:15) at MockAgent.dispatch (node_modules/undici/lib/mock/mock-agent.js:65:25) at MockAgent.request (node_modules/undici/lib/api/api-request.js:169:10) ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Refactor** - Improved the control flow in the `restore()` method to enhance function execution order. - Streamlined logic in agent management for better clarity and efficiency. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
- Loading branch information