Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
432 views
in .NET FTP by (150 points)
When I use SecureFTPConnection to connect to a particular server, the call to Close hangs for around 2 minutes before returning.  Looking at the log file, it looks like the server does not respond to the SSH_MSG_CHANNEL_CLOSE message, and the FTPConnection repeatedly waits for a response before timing out.  If I call Close(true), it does close immediately, but I wasn't sure if this is okay to do.  I also tried connecting to a different server, and it closes immediately when calling Close.  Is this a result of an issue with server I am connecting to?  I am using version 8.6.0.20.

1 Answer

0 votes
by (51.6k points)
selected by
 
Best answer

This is probably happening because the server is failing to reply to the close message, but without looking at the logs I can't be sure.  If you'd like us to look at the logs then please open a ticket here.  Calling Close(true) should be fine though.  SFTP has a closure exchange in order to prevent what's called 'truncation attacks', which are attacks where an attacker cuts a connection prematurely.  It's possible to imagine scenarios in which that could cause harm, but in reality such attacks are generally pretty useless and since network infrastructure often loses connections accidentally, clients and servers are usually tolerant of this.

Categories

...