Conversation
Signed-off-by: cyc60 <avsysoev60@gmail.com>
There was a problem hiding this comment.
Pull request overview
Adds a targeted workaround for web3.py aiohttp session eviction so the operator can force-close any lingering (background) HTTP sessions during shutdown, replacing the previous “sleep to wait for cleanup” approach.
Changes:
- Introduces a
web3.pyinternal monkey patch that tracks evictedaiohttp.ClientSessioninstances and exposesclose_evicted_sessions(). - Updates client shutdown to force-close any tracked evicted sessions instead of sleeping.
- Simplifies shutdown call sites to use the new
close_clients()signature.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/common/web3.py |
Adds monkey patch + tracking set and a shutdown hook to close lingering evicted aiohttp sessions. |
src/common/clients.py |
Removes the optional sleep-based shutdown delay and always calls close_evicted_sessions() during shutdown. |
src/commands/start/base.py |
Updates shutdown call to match the new close_clients() signature. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: cyc60 <avsysoev60@gmail.com>
Signed-off-by: cyc60 <avsysoev60@gmail.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: cyc60 <avsysoev60@gmail.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.