Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
6.4k views
in FAQ: edtFTPj/PRO by (51.6k points)
closed by
Why SSLFTPClient throws a SSLPrematureCloseException?
closed with the note: Answered

1 Answer

0 votes
by (20.4k points)
 
Best answer

This is generally because the FTP server has not correctly responded to the standard SSL/TLS closure exchange sequence. In this case, the server abruptly closes the connection without sending an acknowledgement to the client. The client can be prevented from waiting by setting DISABLE_SSL_CLOSURE:

SSLFTPClient ftp = new SSLFTPClient();
ftp.setConfigFlags(SSLFTPClient.ConfigFlags.DISABLE_SSL_CLOSURE) :
...