fix: add 10-second timeout to oracle resolvePrice RPC call#133
fix: add 10-second timeout to oracle resolvePrice RPC call#133dcccrypto merged 1 commit intodcccrypto:mainfrom
Conversation
resolvePrice() had no timeout configured, allowing indefinite hangs if the external Solana RPC or oracle API became unresponsive. This could accumulate blocked connections and exhaust server resources. Added AbortSignal.timeout(10_000) using the SDK's native abort signal support, which properly cancels the underlying RPC request on timeout. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughA 10-second timeout constraint is added to the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Sentinel security review — MERGE Oracle No blocking findings. Security APPROVED. |
Summary
resolvePrice()had no timeout configured, allowing indefinite hangs if the external Solana RPC or oracle API became unresponsiveAbortSignal.timeout(10_000)using the SDK's native abort signal support, which properly cancels the underlying RPC request on timeoutFiles Changed
src/routes/oracle-router.ts— Added abort signal timeout to resolvePrice call (1 line change)Test plan
tsc --noEmit)🤖 Generated with Claude Code
Summary by CodeRabbit