summaryrefslogtreecommitdiff
path: root/Command/SendKey.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-10-26 15:38:22 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-10-26 15:38:27 -0400
commitc6122cf0a40ce4c565957f68e1076b6ada5c2bea (patch)
treeb2b2a4e52a48d79e3984b5e39672d738d2dbfa8d /Command/SendKey.hs
parent85cb9ac4ab6844166e539ddc6b15922f79c74a19 (diff)
enable forwardRetry for command-line transfers
If a transfer fails for some reason, but some data managed to be sent, the transfer will be retried. (The assistant already did this.) Possible impacts: * More ssh prompts if ssh needs to prompt for a password to connect to a host, or is prompting about some other problem like a ssh key mismatch. * More data transfer due to retrying, epecially when a remote does not support resuming a transfer. In the worst case, a lot of data will be transferred but it fails before the end, and then all that data gets transferred again plus one byte more; repeat until it manages to get the whole file.
Diffstat (limited to 'Command/SendKey.hs')
-rw-r--r--Command/SendKey.hs1
1 files changed, 1 insertions, 0 deletions
diff --git a/Command/SendKey.hs b/Command/SendKey.hs
index 68da10316..302810374 100644
--- a/Command/SendKey.hs
+++ b/Command/SendKey.hs
@@ -48,6 +48,7 @@ fieldTransfer direction key a = do
liftIO $ debugM "fieldTransfer" "transfer start"
afile <- Fields.getField Fields.associatedFile
ok <- maybe (a $ const noop)
+ -- Using noRetry here because we're the sender.
(\u -> runner (Transfer direction (toUUID u) key) afile noRetry a)
=<< Fields.getField Fields.remoteUUID
liftIO $ debugM "fieldTransfer" "transfer done"