I just started using your FTP control and there seems to be a pause on the server that I’m connected to when I disconnect. I get an unexpected state error and handle it, but I was wondering if that was expected behaviour?
Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by JoeP (had 3048 views)
This is normal behavior with version 1.0. At disconnection, an “unexpected state” exception may occur while both sides are racing for disconnection.
The FtpClient instance sends “QUIT” to the server, then tries to disconnect the socket. But it can happen that the FTP server has time to receive the “QUIT” command and disconnect its own socket before we do. Then we get an exception disconnecting our own socket.
In upcoming version 2.0, the Disconnect method does not throw an invalid state exception in this case. With version 1.0, it is safe to catch any exception thrown by Disconnect.
Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by Martin (had 3391 views)