소스 검색

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;