Sfoglia il codice sorgente

Use PulseAll instead of Pulse as we want to signal all threads.

Gert Driesen 8 anni fa
parent
commit
f29b4826a3
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      src/Renci.SshNet/Sftp/SftpFileReader.cs

+ 2 - 2
src/Renci.SshNet/Sftp/SftpFileReader.cs

@@ -38,7 +38,7 @@ namespace Renci.SshNet.Sftp
             {
                 while (!_isCompleted)
                 {
-                    // we reach one chunk beyond the file size to get an EOF
+                    // we read one chunk beyond the file size to get an EOF
                     if (_readAheadOffset > _fileSize)
                         break;
 
@@ -134,7 +134,7 @@ namespace Renci.SshNet.Sftp
             // in both cases, we want to unblock the "read-ahead" thread
             lock (_readLock)
             {
-                Monitor.Pulse(_readLock);
+                Monitor.PulseAll(_readLock);
             }
         }