forked from qt-creator/qt-creator
RemoteLinux: Fix timeouts when deploying files
The default timeout for runBlocking is 10 seconds, which means that whenever deploying a file e.g. over a network connection takes longer, deployment fails. Just set a really large timeout for now, under the assumption that this code path (passing a large amount of data to a process) is only used for deployment. Change-Id: Id5b4902ca97c32f4f024c624e02c0eb341aa7e59 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
@@ -88,13 +88,12 @@ RunResult DeviceShell::run(const CommandLine &cmd, const QByteArray &stdInData)
|
|||||||
qCDebug(deviceShellLog) << "Running fallback:" << fallbackCmd;
|
qCDebug(deviceShellLog) << "Running fallback:" << fallbackCmd;
|
||||||
proc.setCommand(fallbackCmd);
|
proc.setCommand(fallbackCmd);
|
||||||
proc.setWriteData(stdInData);
|
proc.setWriteData(stdInData);
|
||||||
proc.runBlocking();
|
// Practically unlimited timeout since we are most probably running dd for copying
|
||||||
|
// data to a device here (=deployment), so a) we have no idea how long that might take
|
||||||
return RunResult{
|
// for large files, and b) the user can cancel this manually.
|
||||||
proc.exitCode(),
|
proc.runBlocking(/*timout=*/1h);
|
||||||
proc.rawStdOut(),
|
// TODO This misses interesting data like proc.errorMessage() and/or proc.exitMessage()
|
||||||
proc.rawStdErr()
|
return RunResult{proc.exitCode(), proc.rawStdOut(), proc.rawStdErr()};
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const RunResult errorResult{-1, {}, {}};
|
const RunResult errorResult{-1, {}, {}};
|
||||||
|
Reference in New Issue
Block a user