Menu

#466 FTP doesn't ended. Miss SocketTimeOut ?

IFS
open
nobody
None
5
2022-11-29
2022-09-12
No

Hello,
We use the com.ibm.as400.access.FTP class to connect to a iSeries server and retrieved a file.

Sometimes, the #get(String sourceFileName, java.io.File targetFile) method never ended.
When we llok at the method:
f = new FileOutputStream(targetFile);

            int length = in.read(buffer);
            while (length > 0) {
                f.write(buffer, 0, length);
                length = in.read(buffer);
            }

The "in" is a FTPInputStream.
This Stream has been created by a socket. But, It's not possible (without modify jtopen) to access to this socket or change the socketTimeOut ( dataSocket.setSoTimeout(timeout); )

Best regards

Discussion

  • Zhang Ze

    Zhang Ze - 2022-09-12

    I will look at this.

     
  • Zhang Ze

    Zhang Ze - 2022-11-29

    JTOpen11.1 suports to set timeout for FTP.

     

Log in to post a comment.

MongoDB Logo MongoDB