ssg: StaticSiteClient: command timeout
This commit is contained in:
parent
1c7c774795
commit
a09c738141
|
@ -383,7 +383,13 @@ namespace OpenLiveWriter.BlogClient.Clients.StaticSite
|
||||||
proc.BeginOutputReadLine();
|
proc.BeginOutputReadLine();
|
||||||
proc.BeginErrorReadLine();
|
proc.BeginErrorReadLine();
|
||||||
}
|
}
|
||||||
proc.WaitForExit();
|
|
||||||
|
if (!proc.WaitForExit(Config.CmdTimeoutMs))
|
||||||
|
{
|
||||||
|
// Timeout reached
|
||||||
|
try { proc.Kill(); } catch { } // Attempt to kill the process
|
||||||
|
throw new BlogClientException("Command execution timeout", "Blog command timed out. Please check your commands, or lengthen the command timeout."); // TODO move into strings
|
||||||
|
}
|
||||||
|
|
||||||
// The caller will have all output waiting in outStdout and outStderr
|
// The caller will have all output waiting in outStdout and outStderr
|
||||||
outStdout = stdout;
|
outStdout = stdout;
|
||||||
|
|
Loading…
Reference in New Issue