-
Hello, I've been experiencing problems with "established connection aborted by the server" crashing the program when starting a file transfer because not handled properly. I tried implementing the following code to avoid the error :
The error is still triggered, is there any proper way to handle it ? Thanks ! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Do you mean that the library is not handling the error properly? Do you have the stack trace of the error? Your CheckConnection code looks OK to me at first glance. Are you using the latest version 2024.2.0? There were some recent changes to the |
Beta Was this translation helpful? Give feedback.
You can't completely rely on
IsConnected
because the client may not notice the connection is gone unless it actually tries to send data. You could minimize the problem by setting aKeepAliveInterval
to keep the connection alive. There were some bugs in SSH.NET regarding this, but these should be fixed in the latest release, see #843 .