Skip to content

Gracefully handle FileNotFoundException in slave command execution#503

Open
tsautier wants to merge 1 commit intodrftpd-ng:masterfrom
tsautier:fix/issue-328
Open

Gracefully handle FileNotFoundException in slave command execution#503
tsautier wants to merge 1 commit intodrftpd-ng:masterfrom
tsautier:fix/issue-328

Conversation

@tsautier
Copy link
Copy Markdown

@tsautier tsautier commented Jan 14, 2026

Problem

Slave crashes when nuking/deleting/moving/wiping a release while files are actively being transferred. The FileNotFoundException thrown from RootCollection.getRootForFile() was not being caught, causing the slave to disconnect.

Solution

Add specific handling for FileNotFoundException in the slave's async command handler to prevent crashes during race conditions.

Changes Made

  • Modified Slave.AsyncCommandHandler.run() to catch FileNotFoundException
  • Return an appropriate error response instead of crashing
  • Race conditions during file operations no longer kill the slave

Fixes: #328

@tsautier
Copy link
Copy Markdown
Author

@mvangoor @hrxcodes for review

@tsautier tsautier changed the title Fix/issue 328 Gracefully handle FileNotFoundException in slave command execution Jan 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Slave crashes when nuking release where files are in-progress

1 participant