ollama/transfer
Daniel Hiltgen cc4069396f
mlx: bound pull stall retries and let the watchdog interrupt them (#18625)
* transfer: bound stall retries and let the watchdog interrupt them

A download that stalls could never recover. copy derived its own
cancellable context, but the request was built from the parent, so
cancelling on a stall never reached the in-flight body and the read
stayed parked. The stall watchdog could detect a stall it had no way
to stop.

Stall retries were also unbounded: they never incremented attempt, so
the retry loop had no limit, and because backoff was gated on
attempt > 0 they retried with no delay at all.

The request now owns the cancellable context and passes its cancel
down to copy, so a stall aborts the read. Stalls get their own retry
budget before counting against the limit, and backoff is keyed to
every retry rather than only the counted ones.

* move out of x/
2026-09-28 13:31:38 -07:00
..
download.go
redirect.go
redirect_test.go
sparse_other.go
sparse_windows.go
transfer.go
transfer_test.go
upload.go