Browse Source

Small doc fixes, fix warnings and prepare for beta 2.

Gert Driesen 11 years ago
parent
commit
0da2c06ded

+ 1 - 1
Renci.SshClient/Build/nuget/SSH.NET.nuspec

@@ -2,7 +2,7 @@
 <package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
     <metadata>
         <id>SSH.NET</id>
-        <version>2014.4.6-beta1</version>
+        <version>2014.4.6-beta2</version>
         <title>SSH.NET</title>
         <authors>Renci</authors>
         <owners>olegkap</owners>

+ 22 - 17
Renci.SshClient/Renci.SshNet/BaseClient.cs

@@ -257,22 +257,7 @@ namespace Renci.SshNet
         {
             CheckDisposed();
 
-            // only send keep-alive message when we still have a session
-            if (Session != null)
-            {
-                // do not send multiple keep-alive messages concurrently
-                if (Monitor.TryEnter(_keepAliveLock))
-                {
-                    try
-                    {
-                        Session.TrySendMessage(new IgnoreMessage());
-                    }
-                    finally
-                    {
-                        Monitor.Exit(_keepAliveLock);
-                    }
-                }
-            }
+            SendKeepAliveMessage();
         }
 
         /// <summary>
@@ -401,6 +386,26 @@ namespace Renci.SshNet
             _keepAliveTimer = null;
         }
 
+        private void SendKeepAliveMessage()
+        {
+            // do nothing if we have disposed or disconnected
+            if (Session == null)
+                return;
+
+            // do not send multiple keep-alive messages concurrently
+            if (Monitor.TryEnter(_keepAliveLock))
+            {
+                try
+                {
+                    Session.TrySendMessage(new IgnoreMessage());
+                }
+                finally
+                {
+                    Monitor.Exit(_keepAliveLock);
+                }
+            }
+        }
+
         /// <summary>
         /// Starts the keep-alive timer.
         /// </summary>
@@ -414,7 +419,7 @@ namespace Renci.SshNet
                 return;
 
             if (_keepAliveTimer == null)
-                _keepAliveTimer = new Timer(state => SendKeepAlive());
+                _keepAliveTimer = new Timer(state => SendKeepAliveMessage());
             _keepAliveTimer.Change(_keepAliveInterval, _keepAliveInterval);
         }
     }

+ 1 - 0
Renci.SshClient/Renci.SshNet/ForwardedPortDynamic.cs

@@ -63,6 +63,7 @@ namespace Renci.SshNet
         /// Stops local port forwarding, and waits for the specified timeout until all pending
         /// requests are processed.
         /// </summary>
+        /// <param name="timeout">The maximum amount of time to wait for pending requests to finish processing.</param>
         protected override void StopPort(TimeSpan timeout)
         {
             if (IsStarted)

+ 1 - 0
Renci.SshClient/Renci.SshNet/ForwardedPortLocal.cs

@@ -112,6 +112,7 @@ namespace Renci.SshNet
         /// Stops local port forwarding, and waits for the specified timeout until all pending
         /// requests are processed.
         /// </summary>
+        /// <param name="timeout">The maximum amount of time to wait for pending requests to finish processing.</param>
         protected override void StopPort(TimeSpan timeout)
         {
             if (IsStarted)

+ 1 - 0
Renci.SshClient/Renci.SshNet/ForwardedPortRemote.cs

@@ -134,6 +134,7 @@ namespace Renci.SshNet
         /// <summary>
         /// Stops remote port forwarding.
         /// </summary>
+        /// <param name="timeout">The maximum amount of time to wait for pending requests to finish processing.</param>
         protected override void StopPort(TimeSpan timeout)
         {
             // if the port not started, then there's nothing to stop

+ 1 - 1
Renci.SshClient/Renci.SshNet/IServiceFactory.cs

@@ -24,7 +24,7 @@ namespace Renci.SshNet
         /// Creates a new <see cref="ISftpSession"/> in a given <see cref="ISession"/> and with
         /// the specified operation timeout and encoding.
         /// </summary>
-        /// <param name="session">The <see cref="ISession"/> to create the <see cref="INetConfSession"/> in.</param>
+        /// <param name="session">The <see cref="ISession"/> to create the <see cref="ISftpSession"/> in.</param>
         /// <param name="operationTimeout">The operation timeout.</param>
         /// <param name="encoding">The encoding.</param>
         /// <returns>

+ 1 - 1
Renci.SshClient/Renci.SshNet/Security/Cryptography/Hashes/SHA2HashBase.cs

@@ -48,7 +48,7 @@ namespace Renci.SshNet.Security.Cryptography
         /// <summary>
         /// Initializes a new instance of the <see cref="SHA512Hash" /> class.
         /// </summary>
-        public SHA2HashBase()
+        protected SHA2HashBase()
         {
             this._buffer = new byte[8];
 

+ 1 - 1
Renci.SshClient/Renci.SshNet/ServiceFactory.cs

@@ -27,7 +27,7 @@ namespace Renci.SshNet
         /// Creates a new <see cref="ISftpSession"/> in a given <see cref="ISession"/> and with
         /// the specified operation timeout and encoding.
         /// </summary>
-        /// <param name="session">The <see cref="ISession"/> to create the <see cref="INetConfSession"/> in.</param>
+        /// <param name="session">The <see cref="ISession"/> to create the <see cref="ISftpSession"/> in.</param>
         /// <param name="operationTimeout">The operation timeout.</param>
         /// <param name="encoding">The encoding.</param>
         /// <returns>