title: Hangs on file upload
body: <p>My client code looks like this...</p>
  
  <pre><code>public void Upload(string localFile, string remoteFile)
  {
                  ConnectionInfo connectionInfo =
                      new PasswordConnectionInfo(hostIP, username, password);
  
                  using (ScpClient scpClient = new ScpClient(connectionInfo))
                  {
                      scpClient.Connect();
  
                      FileInfo localFileInfo = new FileInfo(localFile);
  
                      scpClient.Upload(localFileInfo, remoteFile);
  
                      scpClient.Disconnect();
                  }
  }
  </code></pre>
  
  <p>When calling this code the library hangs on the call to Monitor in the following...</p>
  
  <pre><code>        while (!this.ReadAvailable(count))
              Monitor.Wait(this._buffer);
  </code></pre>
  
  <p>This snippet is from <code>int Read(byte[] buffer, int offset, int count)</code> in <code>PipeStream</code>.</p>
  
  <p>Others seemed to have had similar issues <a href="http://sshnet.codeplex.com/discussions/347373" rel="nofollow">here</a>.</p>
  
  <p>But the responses haven't helped me as yet and I'd like to avoid editing the source code.</p>
  
  <p>Any ideas?</p>