ssg: StaticSiteClient: allow for disabled timeouts
This commit is contained in:
parent
8143dcf231
commit
e28f2e64c4
|
@ -519,11 +519,18 @@ namespace OpenLiveWriter.BlogClient.Clients.StaticSite
|
||||||
proc.BeginErrorReadLine();
|
proc.BeginErrorReadLine();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!proc.WaitForExit(Config.CmdTimeoutMs))
|
if(Config.CmdTimeoutMs < 0)
|
||||||
{
|
{
|
||||||
// Timeout reached
|
// If timeout is negative, timeout is disabled.
|
||||||
try { proc.Kill(); } catch { } // Attempt to kill the process
|
proc.WaitForExit();
|
||||||
throw new BlogClientException("Command execution timeout", "Blog command timed out. Please check your commands, or lengthen the command timeout."); // TODO move into strings
|
} else
|
||||||
|
{
|
||||||
|
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
|
||||||
|
|
Loading…
Reference in New Issue