diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2015-05-12 22:31:14 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2015-05-12 22:31:14 +0900 |
| commit | 5723f4211a06bc320efdca844b399a2a5b5162ca (patch) | |
| tree | 9088c263f44e62dbf726e72c6260ee8b132f905f /src/InitiateConnectionCommand.cc | |
| parent | 89c1916fa57d87ea09142cc3588044c691d1928f (diff) | |
sftp: Seek to the correct position to resume, fix slow start of transfer
Diffstat (limited to 'src/InitiateConnectionCommand.cc')
| -rw-r--r-- | src/InitiateConnectionCommand.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/InitiateConnectionCommand.cc b/src/InitiateConnectionCommand.cc index 51332fe3..585c1ff3 100644 --- a/src/InitiateConnectionCommand.cc +++ b/src/InitiateConnectionCommand.cc @@ -91,8 +91,10 @@ bool InitiateConnectionCommand::executeInternal() { return false; } try { - getDownloadEngine()->addCommand(createNextCommand(hostname, ipaddr, port, - addrs, proxyRequest)); + auto c = createNextCommand(hostname, ipaddr, port, addrs, proxyRequest); + c->setStatus(Command::STATUS_ONESHOT_REALTIME); + getDownloadEngine()->setNoWait(true); + getDownloadEngine()->addCommand(std::move(c)); return true; } catch(RecoverableException& ex) { // Catch exception and retry another address. |
