• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Chia-Network / chia-blockchain / 35145493490
90%

Build:
DEFAULT BRANCH: main
Ran 16 Sep 2026 09:32PM UTC
Jobs 1
Files 940
Run time 4min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

16 Sep 2026 08:15PM UTC coverage: 90.226% (+0.01%) from 90.215%
35145493490

push

github

web-flow
Handle daemon websocket messages concurrently so a slow RPC handler cannot stall the GUI (#21392)

* Handle daemon websocket messages concurrently in RpcServer

RpcServer.connection() awaited safe_handle() for every message received
from the daemon, so one slow handler held back every later message on
that connection, while the same handlers already run concurrently for
HTTP requests.

On a large wallet this made the GUI unusable after every restart: the
dashboard's get_wallet_balance waits for the wallet state lock, which
state_update_received holds for a whole coin-state batch (with per-coin
peer fetches, tens of minutes here). Every GUI command queued behind it.
Because the loop was not receiving, the wallet also stopped answering the
daemon's websocket pings; after the heartbeat window the daemon closed
the session and, having no registered connection for chia_wallet, dropped
every further GUI command without a reply. The GUI showed only spinners
until its own ten-minute timeout, and the wallet reconnected only once
the blocked handler returned and its reply failed with "Cannot write to
closing transport".

Handle each message in its own referenced task, tracked per server so
await_closed() can cancel whatever is still in flight at shutdown. A
reply that can no longer be delivered because the connection went away
is now logged instead of raised out of the task. The HTTP side already
imposes no ordering or concurrency limit on handlers, and neither does
this.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TzNNe89x7dm2caSxLWXjZY

* Cancel daemon handler tasks before the web server closes, with a bounded wait

Review feedback on #21392: run the handler task cleanup before
webserver.await_closed() and do not wait forever for the cancelled tasks.
asyncio.wait() with a timeout neither cancels nor awaits the tasks once
the timeout passes, so a handler that ignores its cancellation is logged
and ... (continued)

19905 of 24890 branches covered (79.97%)

Branch coverage included in aggregate %.

150 of 150 new or added lines in 2 files covered. (100.0%)

24 existing lines in 3 files now uncovered.

116960 of 126802 relevant lines covered (92.24%)

1.84 hits per line

Coverage Regressions

Lines Coverage ∆ File
22
76.11
-11.95% chia/_tests/core/util/test_lockfile.py
1
75.19
-0.15% chia/server/node_discovery.py
1
69.68
1.29% chia/timelord/timelord_launcher.py
Jobs
ID Job ID Ran Files Coverage
1 35145493490.1 16 Sep 2026 09:32PM UTC 1880
90.23
GitHub Action Run
Source Files on build 35145493490
  • Tree
  • List 940
  • Changed 12
  • Source Changed 2
  • Coverage Changed 12
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #35145493490
  • dd7b1eeb on github
  • Prev Build on main (#35122211688)
  • Next Build on main (#35235243747)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc