ashkulz / NppFTP

Plugin for Notepad++ allowing FTP, FTPS, FTPES and SFTP communications
https://ashkulz.github.io/NppFTP/
322 stars 93 forks source link

Desperate need of a feature: keep the connection alive #358

Open icefront opened 1 year ago

icefront commented 1 year ago

Description of the Issue

There is a decade-old problem with nppftp: it looses the connection after 15 minutes or so. You go to lunch, you receive a phone call, etc. then trying to save the file it freezes Notepad++ for at least 30 seconds. Closing Notepad++ leaves you with an EMPTY FILE.

Steps to Reproduce the Issue

  1. Open a FTP
  2. Open a file
  3. Make some changes and save after your router decides to break your connection with the server (or either the server timeouts your FTP).

Expected Behavior

Automatically ping the server every 1 minute or so. It's not too much, just read the current directory or so. Or any other methodology, just keep the connection alive.

Actual Behavior

  1. The file gets saved on my computer but it doesn't gets uploaded to the server.
  2. The file on the server becomes zero-sized so a power outage or crash leaves me WITHOUT MY PRECIOUS WORK...
  3. After some time Notepad++ recovers, another change has to be made to the file and another save must be initiated.
  4. The folder structure becomes broken, because not only the file saving is gone, the folder refresh is broken also.
  5. Yet another change + save to revive the folder content re-reading.

Note: since I'm working on a LOT by connecting to different networks, after years I discovered that some routers are causing the trouble. Effectively the main problem is the router between my computer and the network provider. For example connecting to another router on the same network, may cause the problem getting away. Connecting back to the first router, brings back the problem. It doesn't matter if I'm connecting via cable or via WiFi. I strongly think, just sending random FTP commands to the server will force the router to extend the timeout, since if I'm frequently saving files or I'm browsing the folder structure, I have no freeze problems.

Debug Information

All debug information since 2012. Nothing has changed since that year in the NppFTP behavior...

Thank you in advance, eliminating this behavior would be a life saver.

chcg commented 1 year ago

Duplicate to #143 and #1 .

Maybe https://github.com/ashkulz/NppFTP/blob/c4d1aa3dbc63a43e86c3511f45382072271b66cb/UTCP/src/ut_clnt.cpp#L2445 with https://github.com/ashkulz/NppFTP/blob/c4d1aa3dbc63a43e86c3511f45382072271b66cb/UTCP/src/ut_clnt.cpp#L2434C11-L2434C11 could help here. Still needs impl to be used by NppFTP maybe with a GUI config option.

KyferEz commented 4 months ago

This issue also may affect keyboard Interactive authentication. You to have to enter your password continuously, once for every operation. I know it's possible to auto-send the password for forced keyboard auth, Filezilla does it, and either that should be done with the saved password, or this issue needs to be remedied. This issue makes using NppFTP abysmal!