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

Created 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.

Viewing all articles
Browse latest Browse all 1026

Trending Articles



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