aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBob Arnson <bob@firegiant.com>2020-05-07 21:34:09 -0400
committerBob Arnson <bob@firegiant.com>2020-05-07 21:45:00 -0400
commit5eabd27e1af2827228b1ed925664bc15d9035484 (patch)
treeabf698289af765770d5672a2edf667ea4066167d /src
parentc53d0d1cc57ce3ed1450adb2c469e2b747584159 (diff)
downloadwix-5eabd27e1af2827228b1ed925664bc15d9035484.tar.gz
wix-5eabd27e1af2827228b1ed925664bc15d9035484.tar.bz2
wix-5eabd27e1af2827228b1ed925664bc15d9035484.zip
Fix timeout
Increase WixNative*.exe timeout to 10 minutes and properly handle when there's a timeout.
Diffstat (limited to 'src')
-rw-r--r--src/WixToolset.Core.Native/WixNativeExe.cs15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/WixToolset.Core.Native/WixNativeExe.cs b/src/WixToolset.Core.Native/WixNativeExe.cs
index 994fc7ec..afa2ed7c 100644
--- a/src/WixToolset.Core.Native/WixNativeExe.cs
+++ b/src/WixToolset.Core.Native/WixNativeExe.cs
@@ -11,7 +11,7 @@ namespace WixToolset.Core.Native
11 11
12 internal class WixNativeExe 12 internal class WixNativeExe
13 { 13 {
14 private const int FiveMinutesInMilliseconds = 300000; 14 private const int TenMinutesInMilliseconds = 600000;
15 private static string PathToWixNativeExe; 15 private static string PathToWixNativeExe;
16 16
17 private readonly string commandLine; 17 private readonly string commandLine;
@@ -63,17 +63,22 @@ namespace WixToolset.Core.Native
63 process.StandardInput.WriteLine(); 63 process.StandardInput.WriteLine();
64 } 64 }
65 65
66 if (process.WaitForExit(FiveMinutesInMilliseconds)) 66 if (process.WaitForExit(TenMinutesInMilliseconds))
67 { 67 {
68 // If the process successfully exits documentation says we need to wait again 68 // If the process successfully exits documentation says we need to wait again
69 // without a timeout to ensure that all of the redirected output is captured. 69 // without a timeout to ensure that all of the redirected output is captured.
70 // 70 //
71 process.WaitForExit(); 71 process.WaitForExit();
72 }
73 72
74 if (process.ExitCode != 0) 73 if (process.ExitCode != 0)
74 {
75 throw new Win32Exception(process.ExitCode);
76 }
77 }
78 else
75 { 79 {
76 throw new Win32Exception(process.ExitCode); 80 process.Kill();
81 throw new Win32Exception(1460/*ERROR_TIMEOUT*/);
77 } 82 }
78 } 83 }
79 84