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

Commented Unassigned: Problem with Session.NET SocketConnect [1661]

$
0
0
When running a multithreaded application, when both threads hit the SocketConnect method at the same time I get a "The system has detected an invalid pointer address when attempting to make a pointer call" error at the line:
```
var connectResult = this._socket.BeginConnect(ep, null, null);
```
when it hits the second time.

If I change this to:
```
this._socket.Connect(ep);
```

All threads execute without a problem.

This change also seems to resolve the "disconnect" issue. You can now freely connect and disconnect without having to create a new SFTPClient object.

I understand why we want to use the Async method of BeginConnect.... but I don't understand why the async call causes and error and the non-Async method doesn't.
Comments: ** Comment from web user: Crucial **

Again... this problem only seems to occur while inside an HTTPS Proxy environment. When outside the proxy environment, the code executes as expected. I am unsure if the problem is caused by the library or by a problem within the DotNet framework seeing as the error is caused within the Socket object.


Viewing all articles
Browse latest Browse all 1026

Trending Articles



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