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

Commented Unassigned: Current Beta does not close Channels [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: ** Comment from web user: da_rinkes **

Forgot the Programm output:

```
connected: True
Opening Shell: 0
sri-box2.genua.de#
Opening Shell: 1
sri-box2.genua.de#
Opening Shell: 2
sri-box2.genua.de#
Opening Shell: 3
sri-box2.genua.de#
Opening Shell: 4
sri-box2.genua.de#
Opening Shell: 5
sri-box2.genua.de#
Opening Shell: 6
sri-box2.genua.de#
Opening Shell: 7
sri-box2.genua.de#
Opening Shell: 8
sri-box2.genua.de#
Opening Shell: 9
sri-box2.genua.de#
Opening Shell: 10
```

=> hangs at Opening Shell: 10


Viewing all articles
Browse latest Browse all 1026

Trending Articles



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