Browse Source

Bug fix: Session instance could not be used anymore after calling ScanFingerprint

Source commit: 692659c931d5ae8cf373a16d53068c6413cd3a84
Martin Prikryl 9 years ago
parent
commit
e389a9195b
1 changed files with 4 additions and 1 deletions
  1. 4 1
      dotnet/Session.cs

+ 4 - 1
dotnet/Session.cs

@@ -334,9 +334,12 @@ namespace WinSCP
                 catch (Exception e)
                 {
                     Logger.WriteLine("Exception: {0}", e);
-                    Cleanup();
                     throw;
                 }
+                finally
+                {
+                    Cleanup();
+                }
 
                 return result;
             }