fix: handle send errors when unsubscribing solana logs#1274
Conversation
Wraps the logsUnsubscribe send in a try/catch so a closed or non-OPEN socket doesn't throw an unhandled exception and crash the coinstack. The base class auto-reconnects and replays subscriptions via onOpen, so no retry is needed here. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe PR adds error handling to the WebSocket unsubscribe method in the Solana API. The ChangesSolana WebSocket Error Handling
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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 |
Summary
logsUnsubscribesend inunsubscribe()with a try/catch, matching the pattern already used insubscribeAddresses.AddressSubscriptionWebsocketClientauto-reconnects on close and replays subscriptions viaonOpen, which callssubscribeAddresses(this.addresses). Stale subscription IDs on the old socket are abandoned with the old connection.Test plan
🤖 Generated with Claude Code
Summary by CodeRabbit