dart_ftpclient icon indicating copy to clipboard operation
dart_ftpclient copied to clipboard

Connection to server doesn't time out according to timeout parameter

Open AdelMimoun opened this issue 5 years ago • 1 comments

When attempting to connect to a server, if the server is unavailable, the connection times out after over two minutes, instead of the timeout value previously set.

Smartphone:

  • Device: Huawei p20 pro CLT-L29
  • OS: Android 9

Log ... I/flutter ( 8045): [25.04.2020 18:02:29.330] Connecting... I/flutter ( 8045): SocketException: Connection failed (OS Error: Connection timed out, errno = 110), address = 10.101.0.1, port = 21


The timeout happened after 2 minutes and 15 seconds, while the timeout value was set to 10 seconds in the FTPClient constructor

AdelMimoun avatar Apr 25 '20 16:04 AdelMimoun

The timeout is currently not used as a socket timeout. It's just a timeout how long the lib waits for a reply from a command.

I'll add the timeout to the socket connection.

virtualmarc avatar Apr 27 '20 10:04 virtualmarc