Hi
I am using edt ftp pro 5.2.1.
I use AsyncTransferClient with ftp connection pool. When i try rename operation on a server wihtout sufficient priviliges, number of connections to remote server exceeds the determined number. I checked connections with netstat command. I called blocking methods with java 8 parallelStreams. What may be the reason of this situation. Here is the sample code
AsyncFileTransferClient client = new AsyncFileTransferClient(1, 5);
client.setRemoteHost("localhost");
client.setProtocol(Protocol.FTP);
client.setUserName("*");
client.setPassword("*");
client.connect();
FTPFile files[] = client.directoryList();
List<FTPFile> fileList = Arrays.asList(files);
while (true) {
fileList.parallelStream().forEach((t) -> {
try {
client.rename(t.getName(), "." + t.getName());
client.downloadFile(t.getName(), "." + t.getName());
} catch (FTPException ex) {
Logger.getLogger(FtpTEst.class.getName()).log(Level.SEVERE, null, ex);
} catch (IOException ex) {
Logger.getLogger(FtpTEst.class.getName()).log(Level.SEVERE, null, ex);
}
});
}