mscdex / mscdex/ssh2

discussion: timeout handling using AbortController

Open
#1,299 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

feature request
Dominant language
JavaScript
Stars
5.8k
Forks
734
PR merge metrics
No merged PRs in 30d

Description

Not sure if this is discussed before. Can ssh2 support AbortController so certain operations can be cancellable due to say timeout?

Currently I implemented a timeout before invoking FastGet. But while the main app timeout the operation (do not wait for it to finish), I believe FastGet actually is still running. So I am looking for a way to cancel the operation when timeout, without terminating the connection. The advantage is I can reduce unnecessary bandwidth usage, and clean up the file without the file being locked.

Thanks for your time.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the FastGet operation and the current timeout behavior described in the issue, then review how AbortController could represent cancellation without terminating the connection. Done means a timed-out operation stops its ongoing work and avoids unnecessary bandwidth or file-locking effects while the connection remains usable.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.