termscp icon indicating copy to clipboard operation
termscp copied to clipboard

[BUG] - Unable to quit the running task such as "search"

Open c02y opened this issue 3 years ago • 1 comments

Description

A clear and concise description of what the bug is.

When I connect to my ftp client successfully, I try to search a keyword in it using F, but it gets stuck in the Searching for "xxx" window, and I cannot quit the job or use other command like F10|Q or F1|H, I have to kill termcp process from other temrinal.

Steps to reproduce

Steps to reproduce the bug you encountered

  1. Connect to a client through FTP
  2. navigate to the client directory
  3. F to search something
  4. it gets stuck, unable to do anything else, have to kill it in other terminal

Expected behaviour

A clear and concise description of what you expected to happen.

It should successfully find or not_find the files/directories instead of getting stuck, and it should not prevent other commands

Environment

  • OS: [e.g. GNU/Linux Debian 10] Arch Linux
  • Architecture [Arm, x86_64, ...] x86_x64
  • Rust version: rustc 1.62.0 (a8314ef7d 2022-06-27)
  • termscp version: 0.9.0
  • Protocol used : FTP
  • Remote server version and name: Android Smart Phone, not sure the version and name

Log

Report the snippet of the log file containing the unexpected behaviour. If there is any information you consider to be confidential, shadow it.

Additional information

Add any other context about the problem here.

c02y avatar Jul 13 '22 19:07 c02y

It's not really a bug, the problem is that currently, the file transfer actions are blocking since everything runs on the same thread.

I've been thinking about refactoring the UI for a long time and putting the file transfer on another thread as a Service, but this would require a huge refactoring and a lot of time, which I'm not going to invest at the moment.

The only thing you can do is to avoid long-time execution searches.

veeso avatar Jul 15 '22 10:07 veeso