Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
6.4k views
in Java FTP by (120 points)
How important is it to call disconnect() on a FileTransferClient object? All official examples don't care about closing the FTP connection if an exception was thrown. Don't we have to call disconnect in finally? Or get this method called automatically (when)?

1 Answer

0 votes
by (162k points)
You should call disconnect() inside a try/catch, and disconnect(true) if that throws an exception.

Categories

...