Skip to content

Commit 216f364

Browse files
committed
Update comments.
1 parent 385b8a6 commit 216f364

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/Renci.SshNet/Sftp/SftpFileReader.cs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -129,18 +129,19 @@ public byte[] Read()
129129
}
130130
}
131131

132-
// when the server returned less bytes than requested (for the previous chunk)
133-
// we'll synchronously request the remaining data
132+
// When the server returned less bytes than requested (for the previous chunk)
133+
// we'll synchronously request the remaining data.
134134
//
135-
// due to the optimization above, we'll only get here in one of the following cases:
135+
// Due to the optimization above, we'll only get here in one of the following cases:
136136
// - an EOF situation for files for which we were unable to obtain the file size
137137
// - fewer bytes that requested were returned
138138
//
139-
// according to the SSH specification, this last case should never happen for normal
140-
// disk files (but can happen for device files).
139+
// According to the SSH specification, this last case should never happen for normal
140+
// disk files (but can happen for device files). In practice, OpenSSH - for example -
141+
// returns less bytes than requested when requesting more than 64 KB.
141142
//
142143
// Important:
143-
// to avoid a deadlock, this read must be done outside of the read lock
144+
// To avoid a deadlock, this read must be done outside of the read lock
144145

145146
var bytesToCatchUp = nextChunk.Offset - _offset;
146147

0 commit comments

Comments
 (0)