Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
+1 vote
203 views
in Java FTP by (140 points)
I am using SecureFileTransferClient for connection pool. As a part of closing the connection, I call disconnect() method, but I see this problem.

java.base@11.0.19/java.lang.Object.wait(Native Method)

java.base@11.0.19/java.lang.Object.wait(Object.java:328)

com.enterprisedt.net.ftp.async.AsyncResult.waitTillComplete(AsyncResult.java:282)

com.enterprisedt.net.ftp.async.AsyncResult.endAsyncInternal(AsyncResult.java:298)

com.enterprisedt.net.ftp.async.DisconnectResult.endAsync(DisconnectResult.java:148)

com.enterprisedt.net.ftp.SecureFileTransferClient.disconnect(SecureFileTransferClient.java:1458)

I am using 7.3.0 version. Is there any upgraded library that we have to use here? Is there a cleaner way to close the connection. Can someone please help here?
Thanks!

1 Answer

0 votes
by (51.6k points)

It's generally safe to close the connection without waiting for a response from the server. This may be done by passing true to the SecureFileTransferClient.disconnect(boolean) method.

Categories

...