DeadLock in ForwardedPortLocal?

May 19, 2011 at 2:34 AM

Hello

I am following documentation to create local port forwarding.

                    client.Connect();
                    var port = client.AddForwardedPort<ForwardedPortLocal>(8084, "host to be forwarded", 80);
                    port.Exception += delegate(object sender, ExceptionEventArgs e)
                    {
                        Console.WriteLine(e.Exception.ToString());
                    };
                    port.Start();                  
                    Thread.Sleep(1000 * 60 * 20); //    Wait 20 minutes for port to be forwarded                   
                    port.Stop();

It looks like there is a problem in the ForwardedPortLocal Stop() method which is being called from body of the Task and is (according to documentation) supposed to be called after I am done with redirection. Is it right to call this._listenerTask.Wait() from inside of the task body? In my case it hangs 100% of the time...

May 19, 2011 at 8:59 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Coordinator
Jun 21, 2011 at 4:57 PM

I found the problem. Please use 8928 codeset to see if it fixes the issue.

Sorry for delay in response to this issue.

 

Thanks,

Oleg

Jun 22, 2011 at 3:39 PM

Thank You!