Skip to content

Commit 0da2c06

Browse files
committed
Small doc fixes, fix warnings and prepare for beta 2.
1 parent 2659048 commit 0da2c06

File tree

8 files changed

+29
-21
lines changed

8 files changed

+29
-21
lines changed

Renci.SshClient/Build/nuget/SSH.NET.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
33
<metadata>
44
<id>SSH.NET</id>
5-
<version>2014.4.6-beta1</version>
5+
<version>2014.4.6-beta2</version>
66
<title>SSH.NET</title>
77
<authors>Renci</authors>
88
<owners>olegkap</owners>

Renci.SshClient/Renci.SshNet/BaseClient.cs

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -257,22 +257,7 @@ public void SendKeepAlive()
257257
{
258258
CheckDisposed();
259259

260-
// only send keep-alive message when we still have a session
261-
if (Session != null)
262-
{
263-
// do not send multiple keep-alive messages concurrently
264-
if (Monitor.TryEnter(_keepAliveLock))
265-
{
266-
try
267-
{
268-
Session.TrySendMessage(new IgnoreMessage());
269-
}
270-
finally
271-
{
272-
Monitor.Exit(_keepAliveLock);
273-
}
274-
}
275-
}
260+
SendKeepAliveMessage();
276261
}
277262

278263
/// <summary>
@@ -401,6 +386,26 @@ private void StopKeepAliveTimer()
401386
_keepAliveTimer = null;
402387
}
403388

389+
private void SendKeepAliveMessage()
390+
{
391+
// do nothing if we have disposed or disconnected
392+
if (Session == null)
393+
return;
394+
395+
// do not send multiple keep-alive messages concurrently
396+
if (Monitor.TryEnter(_keepAliveLock))
397+
{
398+
try
399+
{
400+
Session.TrySendMessage(new IgnoreMessage());
401+
}
402+
finally
403+
{
404+
Monitor.Exit(_keepAliveLock);
405+
}
406+
}
407+
}
408+
404409
/// <summary>
405410
/// Starts the keep-alive timer.
406411
/// </summary>
@@ -414,7 +419,7 @@ private void StartKeepAliveTimer()
414419
return;
415420

416421
if (_keepAliveTimer == null)
417-
_keepAliveTimer = new Timer(state => SendKeepAlive());
422+
_keepAliveTimer = new Timer(state => SendKeepAliveMessage());
418423
_keepAliveTimer.Change(_keepAliveInterval, _keepAliveInterval);
419424
}
420425
}

Renci.SshClient/Renci.SshNet/ForwardedPortDynamic.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ protected override void StartPort()
6363
/// Stops local port forwarding, and waits for the specified timeout until all pending
6464
/// requests are processed.
6565
/// </summary>
66+
/// <param name="timeout">The maximum amount of time to wait for pending requests to finish processing.</param>
6667
protected override void StopPort(TimeSpan timeout)
6768
{
6869
if (IsStarted)

Renci.SshClient/Renci.SshNet/ForwardedPortLocal.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ protected override void StartPort()
112112
/// Stops local port forwarding, and waits for the specified timeout until all pending
113113
/// requests are processed.
114114
/// </summary>
115+
/// <param name="timeout">The maximum amount of time to wait for pending requests to finish processing.</param>
115116
protected override void StopPort(TimeSpan timeout)
116117
{
117118
if (IsStarted)

Renci.SshClient/Renci.SshNet/ForwardedPortRemote.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ protected override void StartPort()
134134
/// <summary>
135135
/// Stops remote port forwarding.
136136
/// </summary>
137+
/// <param name="timeout">The maximum amount of time to wait for pending requests to finish processing.</param>
137138
protected override void StopPort(TimeSpan timeout)
138139
{
139140
// if the port not started, then there's nothing to stop

Renci.SshClient/Renci.SshNet/IServiceFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ internal partial interface IServiceFactory
2424
/// Creates a new <see cref="ISftpSession"/> in a given <see cref="ISession"/> and with
2525
/// the specified operation timeout and encoding.
2626
/// </summary>
27-
/// <param name="session">The <see cref="ISession"/> to create the <see cref="INetConfSession"/> in.</param>
27+
/// <param name="session">The <see cref="ISession"/> to create the <see cref="ISftpSession"/> in.</param>
2828
/// <param name="operationTimeout">The operation timeout.</param>
2929
/// <param name="encoding">The encoding.</param>
3030
/// <returns>

Renci.SshClient/Renci.SshNet/Security/Cryptography/Hashes/SHA2HashBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public override bool CanTransformMultipleBlocks
4848
/// <summary>
4949
/// Initializes a new instance of the <see cref="SHA512Hash" /> class.
5050
/// </summary>
51-
public SHA2HashBase()
51+
protected SHA2HashBase()
5252
{
5353
this._buffer = new byte[8];
5454

Renci.SshClient/Renci.SshNet/ServiceFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public ISession CreateSession(ConnectionInfo connectionInfo)
2727
/// Creates a new <see cref="ISftpSession"/> in a given <see cref="ISession"/> and with
2828
/// the specified operation timeout and encoding.
2929
/// </summary>
30-
/// <param name="session">The <see cref="ISession"/> to create the <see cref="INetConfSession"/> in.</param>
30+
/// <param name="session">The <see cref="ISession"/> to create the <see cref="ISftpSession"/> in.</param>
3131
/// <param name="operationTimeout">The operation timeout.</param>
3232
/// <param name="encoding">The encoding.</param>
3333
/// <returns>

0 commit comments

Comments
 (0)