mscdex / mscdex/ssh2

SFTP debug message reverses "Buffered" and "Sending"

Open Beginner friendly
#1,152 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

In SFTP.js, both these exist:

const isBuffered = sendOrBuffer(this, buf);
this._debug && this._debug(
  `SFTP: Outbound: ${isBuffered ? 'Buffered' : 'Sending'} OPEN`
);

And:

const isSent = sendOrBuffer(this, out);
if (this._debug) {
  const how = (isSent ? 'Sent' : 'Buffered');
  this._debug(`SFTP: Outbound: ${how} WRITE (id:${reqid})`);
}

I think the second one is the correct one and that "Sent" and "Buffered" is reversed in the first...

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

Open SFTP.js and compare the OPEN debug message with the nearby WRITE message that uses sendOrBuffer(). Trace the isBuffered and isSent values and verify the debug output labels the operation as Buffered when queued and Sending or Sent when transmitted. Done means the OPEN message no longer reverses those labels.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
networking
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.