Skip to content

Commit 391a41c

Browse files
committed
Move on :p
1 parent 98aba49 commit 391a41c

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/Renci.SshNet/Sftp/SftpFileReader.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ internal class SftpFileReader : ISftpFileReader
2020
/// Holds the size of the file, when available.
2121
/// </summary>
2222
private readonly long? _fileSize;
23-
private readonly IDictionary<int, BufferedRead> _queue;
23+
private readonly Dictionary<int, BufferedRead> _queue;
2424
private readonly WaitHandle[] _waitHandles;
2525

2626
private int _readAheadChunkIndex;
@@ -325,9 +325,7 @@ private bool ContinueReadAhead()
325325

326326
private void ReadCompleted(IAsyncResult result)
327327
{
328-
var readAsyncResult = result as SftpReadAsyncResult;
329-
if (readAsyncResult == null)
330-
return;
328+
var readAsyncResult = (SftpReadAsyncResult) result;
331329

332330
byte[] data;
333331

@@ -343,7 +341,7 @@ private void ReadCompleted(IAsyncResult result)
343341

344342
// a read that completes with a zero-byte result signals EOF
345343
// but there may be pending reads before that read
346-
var bufferedRead = (BufferedRead)readAsyncResult.AsyncState;
344+
var bufferedRead = (BufferedRead) readAsyncResult.AsyncState;
347345
bufferedRead.Complete(data);
348346

349347
lock (_readLock)

0 commit comments

Comments
 (0)