Quantcast
Channel: sshnet Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 1026

Closed Issue: Client channels are no longer closed on dispose [1943]

$
0
0
It seems that in the current Beta-Version Channels are not closed correctly.
After the default of 10 open channels, it is not possible to open a new ShellStream.

Following Test-Programm:

```
using System;
using System.Threading;
using Renci.SshNet;

namespace SshTests
{
class Program
{
static void Main(string[] args)
{

using (var client = new SshClient("1.2.3.4", "foo", "blabla"))
{
try
{
client.Connect();
Console.WriteLine("connected: " + client.IsConnected);

for (int i = 0; i < 20; i++)
{
Console.WriteLine("Opening Shell: " + i);
OpenShell(client);
}
}
catch (Exception exception)
{
Console.WriteLine(exception);
}
}

Console.WriteLine("ENTER to exit");
Console.ReadLine();
}


static void OpenShell(SshClient client)
{
using (var stream = client.CreateShellStream("vt220", 20, 20, 20, 20, 0))
{
Console.WriteLine(stream.ReadLine());
}
Thread.Sleep(1000);
}
}
}
```

Expected is that the Channel is freed at Dispose().
Comments: Fixed in 2014.4.6-beta2.

Viewing all articles
Browse latest Browse all 1026

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>