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

Edited Issue: sio fails: An established connection was aborted by the software in your host machine [2029]

$
0
0
Seems like library does not handle Socket Exceptions gracefully in all cases.
If I set time span value for SendKeepAlive and connection is lost System.Net.Sockets.SocketException exception is thrown. As far as I understand, no exceptions should be thrown but OnError event should be raised?

I'm using version 2013.4.7, but tried with current source with same results.
I've fixed it for myself by wrapping it with try / catch in SendKeepAlive method in Session.cs, so it looks like this now

```
internal void SendKeepAlive()
{
try
{
this.SendMessage(new IgnoreMessage());
}
catch (Exception exp)
{
this.RaiseError(exp);
}
}
```

Thank you for your work, regards.


```
Exception: An established connection was aborted by the software in your host machine
ErrorCode: 10053
at Renci.SshNet.Session.SocketWrite(Byte[] data)
at Renci.SshNet.Session.SendMessage(Message message)
at Renci.SshNet.BaseClient.SendKeepAlive()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.TimerQueueTimer.CallCallback()
at System.Threading.TimerQueueTimer.Fire()
at System.Threading.TimerQueue.FireNextTimers()
```
Comments: ** Comment from web user: drieseng **

Fixed in changeset 40956.


Viewing all articles
Browse latest Browse all 1026

Trending Articles



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