title: Semaphore timeout period has expired
body: <p>I have a simple C# program that copies files from one network share to another. The program just threw a "The semaphore timeout period has expired" error. I've never seen this before and I'm kind of confused as to what it is.</p>
  
  <p>The code is pretty simple:
  (srcPath and destPath are read from configuration settings)</p>
  
  <pre><code>DirectoryInfo di = new DirectoryInfo(srcPath);
  
          try
          {
  
              FileInfo[] files = di.GetFiles();
  
              foreach (FileInfo fi in files)
              {
                  if(!(fi.Name.Contains("_desc")))
                  {
                      File.Copy(fi.FullName, destPath + fi.Name, true);
                  }
              }
          }
          catch (Exception xx)
          {
              SendMail(xx.Message, xx.StackTrace);
          }
          finally
          {
  
          }
  </code></pre>