max / makenotwork
1 file changed,
+7 insertions,
-0 deletions
| @@ -67,6 +67,13 @@ fn validate_env_names(step: &Step) -> Result<()> { | |||
| 67 | 67 | /// is either a plain path (local) or `target:path` (ssh). | |
| 68 | 68 | fn rsync_command(src: &str, dst: &str, over_ssh: bool, opts: &SyncOpts) -> Command { | |
| 69 | 69 | let mut rsync = Command::new("rsync"); | |
| 70 | + | // Kill the transfer if the caller's future is dropped (e.g. a promote whose | |
| 71 | + | // HTTP handler was cancelled by a client disconnect). Without this the | |
| 72 | + | // rsync orphans and keeps running; a retry then spawns a second rsync that | |
| 73 | + | // fights the first over the same `--delete` destination dir, wedging the | |
| 74 | + | // deploy. Matches the ssh-exec (remote.rs) and local-exec (executor.rs) | |
| 75 | + | // paths, which already set it. | |
| 76 | + | rsync.kill_on_drop(true); | |
| 70 | 77 | rsync.arg("-az").arg("--partial"); | |
| 71 | 78 | if opts.delete { | |
| 72 | 79 | rsync.arg("--delete"); |