Files
ElyOffice/tasks/reviews/C01.2b-r3.md
T

1.3 KiB

PASS

Ran cargo test -p ely-platform (12 integration tests and the unit tests pass; the integration suite passed 5 runs in a row), cargo clippy -p ely-platform --all-targets (clean), cargo fmt -p ely-platform --check (clean), cargo check --workspace (ok), tests/scripts/comments.py and tests/scripts/agents_md.py (both pass).

Round 2 defect:

  1. Stalled or cancelled download leaks its reader thread and socket: fixed. IdleConnector/Idle caps every transport wait at idle, so ureq's TcpTransport sets a socket read timeout. The blocked read returns, the thread ends, and the connection drops. Probe (scratch crate, same silent server as round 2): ten stalls at idle = 200 ms each failed with "the download stalled" in about 204 ms. 2 s later the process had 2 threads and 1 TCP descriptor, the same as before the stalls. Five instant cancels returned None in about 1 ms each. Right after them there were 12 threads and 11 TCP descriptors, and 2 s later they were back to 2 and 1. a_stalled_download_fails_and_frees_its_socket and a_cancel_is_answered_at_once_and_the_socket_is_freed_within_the_idle_time check that the server sees EOF or reset.

No new defects found in the changed code (update.rs idle transport, the stall and cancel tests, and the //////! handling in comments.py).