michaellukashov / Far-NetBox

SFTP/SCP/FTP/FTPS/WebDAV/S3 client for Far Manager 3 (http://farmanager.com/)
https://forum.farmanager.com/viewtopic.php?t=6317
GNU General Public License v2.0
155 stars 52 forks source link

Fix possible crashes on lost connections while modal dialog is shown #462

Closed ssvine closed 2 months ago

ssvine commented 2 months ago

When a modal dialog is shown and in that moment a connection becomes broken, a crash can happen.

There are a lot of examples. To reproduce one of them:

  1. open SCP connection
  2. press F8 on some file and see the confirmation dialog
  3. simulate broken connection (e.g. kill ssh process, reconnect vpn, etc)
  4. you'll see an error message about broken connection. Press Abort, then Ok or Cancel, and get the crash

This PR fixes this problem.

sonarcloud[bot] commented 2 months ago

Quality Gate Failed Quality Gate failed

Failed conditions
B Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint