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

Dereference waithandle instance field before disposing it.

drieseng преди 9 години
родител
ревизия
3e0100272c
променени са 1 файла, в които са добавени 1 реда и са изтрити 2 реда
  1. 1 2
      src/Renci.SshNet/KeyboardInteractiveAuthenticationMethod.cs

+ 1 - 2
src/Renci.SshNet/KeyboardInteractiveAuthenticationMethod.cs

@@ -81,7 +81,6 @@ namespace Renci.SshNet
         private void Session_UserAuthenticationSuccessReceived(object sender, MessageEventArgs<SuccessMessage> e)
         {
             _authenticationResult = AuthenticationResult.Success;
-
             _authenticationCompleted.Set();
         }
 
@@ -160,8 +159,8 @@ namespace Renci.SshNet
                 var authenticationCompleted = _authenticationCompleted;
                 if (authenticationCompleted != null)
                 {
-                    authenticationCompleted.Dispose();
                     _authenticationCompleted = null;
+                    authenticationCompleted.Dispose();
                 }
 
                 _isDisposed = true;