arduino / arduino-cli

Arduino command line tool
https://arduino.github.io/arduino-cli/latest/
GNU General Public License v3.0
4.24k stars 370 forks source link

Make gRPC downloads cancelable by complying to `context.Context` done signaling. #2595

Closed cmaglie closed 1 month ago

cmaglie commented 2 months ago

Describe the request

A download is currently not cancelable. This is not a big problem in the standalone CLI app, since it can be forcibly terminated with a CTRL-C, it may be a bigger problem using gRPC because if a download-triggering call is closed or canceled, the underlying download is not stopped.

To achieve this feature two tasks are needed:

Describe the current behavior

A download is not stopped if the gRPC call that caused it is canceled.

Arduino CLI version

nightly

Operating system

N/A

Operating system version

N/A

Additional context

No response

Issue checklist