Skip to content

v0.2.12 — Fix client-side disconnects + backend protocol parity

Choose a tag to compare

@hthillman hthillman released this 03 Jun 17:46
· 44 commits to main since this release

Download demonTD-v0.2.12.zip (the bundle), not the bare demonTD.tox. Extract it and keep demonTD.tox next to the vendor/ folder — see the Windows install notes.

1. Fixed: client-side disconnects ("no errors on the pod")

Persistent disconnects where the client tore the connection down and the pod logged nothing.

Root cause: concurrent read+write on the same ssl.SSLSocket from two threads. Sends (main thread, SSL_write) raced the recv loop (bg thread, SSL_read) with no lock between them. Python's SSLSocket isn't safe for that — OpenSSL's record layer corrupts (SSL: BAD_LENGTH) → abrupt client-side close. v0.2.11's params-every-tick keepalive (~30–60 sends/s) made the collision far more likely, which is why disconnects got worse after that release.

Fix: ws_client now touches the socket from exactly one thread.

  • send_text/send_binary only enqueue onto a bounded outbound queue; the recv thread drains and sends it between recvs, so reads and writes never overlap.
  • close() signals the recv thread instead of touching the socket.
  • Removed the 25 s app-level WS ping (another cross-thread write) — keepalive is purely the param stream, like the browser web client.
  • Rich close diagnostics: closed (...) — uptime=Xs sent=N recv=N dropped=N since_last_recv=Xs.

Confirmed stable in a live hosted session.

2. Backend protocol parity (drift now clean)

Caught up to backend sync DEMON.git@1c07327:

  • lead_floor_s / lead_ceiling_s / lead_release_tau_s — server-side decode-buffer lookahead tuning (latency vs robustness to GPU contention). New Lead params on the Init page (web defaults 0.25 / 1.35 / 1.5), sent at Connect.
  • set_interp_method — per-path blend interpolation (slerp/linear) for prompt / timbre / structure / feedback. Four Blend Interpolation menus on the Prompt+LoRA page; applied on change and re-pushed on every ready.

Docs

  • New Windows install section (Win 11 + TD 2025.32820 confirmed): download the bundle zip, keep vendor/ next to the .tox, ffmpeg note for MP3/M4A, Windows audio-device guidance.
  • Fixed the stale "Source Audio File" quick-start step — source is now a wired Audio File In CHOP (the picker was removed in v0.2.8).

Tests: 79 passed (new tests/test_ws_client.py). Drift: clean vs demon-public-demo origin/main. BUILD_MARKER = v0.2.12-ws-socket-and-protocol-parity; UA DaydreamDEMON-TD/0.2.12.