Преглед на файлове

Remove EndInvoke with timeout as we use the IAsyncResult.AsyncWaitHandle for this.

Gert Driesen преди 8 години
родител
ревизия
bea764f812
променени са 1 файла, в които са добавени 2 реда и са изтрити 9 реда
  1. 2 9
      src/Renci.SshNet/Common/AsyncResult.cs

+ 2 - 9
src/Renci.SshNet/Common/AsyncResult.cs

@@ -78,20 +78,12 @@ namespace Renci.SshNet.Common
         /// Waits until the asynchronous operation completes, and then returns. 
         /// </summary>
         internal void EndInvoke()
-        {
-            EndInvoke(Session.InfiniteTimeSpan);
-        }
-
-        /// <summary>
-        /// Waits until the asynchronous operation completes, and then returns. 
-        /// </summary>
-        internal void EndInvoke(TimeSpan timeout)
         {
             // This method assumes that only 1 thread calls EndInvoke for this object
             if (!IsCompleted)
             {
                 // If the operation isn't done, wait for it
-                var completed = AsyncWaitHandle.WaitOne(timeout);
+                AsyncWaitHandle.WaitOne();
                 _asyncWaitHandle = null;  // Allow early GC
                 AsyncWaitHandle.Dispose();
 
@@ -161,6 +153,7 @@ namespace Renci.SshNet.Common
         {
             get { return _completedState != StatePending; }
         }
+
         #endregion
     }