aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-08-29 16:12:39 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-08-29 16:12:39 +0200
commitc9a062d44807803f1cdfcfe62d49ad1f18162baa (patch)
tree279521093999d228a7ffcb204fd45b9b562cf4b8
parentb56e7cd12b30fbb891e1947fb3a0eef06dc7ab89 (diff)
Bump BLODA timeout to 350ms
-rw-r--r--libbutl/process.cxx13
1 files changed, 5 insertions, 8 deletions
diff --git a/libbutl/process.cxx b/libbutl/process.cxx
index e4ccf9e..9169841 100644
--- a/libbutl/process.cxx
+++ b/libbutl/process.cxx
@@ -1453,7 +1453,7 @@ namespace butl
il.unlock ();
l.unlock ();
- DWORD r (WaitForSingleObject (pi.hProcess, 250));
+ DWORD r (WaitForSingleObject (pi.hProcess, 350));
if (r == WAIT_OBJECT_0 &&
GetExitCodeProcess (pi.hProcess, &r) &&
@@ -1461,20 +1461,17 @@ namespace butl
{
timestamp now (system_clock::now ());
- // Assume we were waiting for 250 ms if the time adjustment is
+ // Assume we have waited the full amount if the time adjustment is
// detected.
//
- duration d (now > st ? now - st : 250ms);
+ duration d (now > st ? now - st : 350ms);
- // Re-spawn the process if timeout is not fully exhausted.
+ // If timeout is not fully exhausted, re-lock the mutex, revert
+ // handles to inheritable state and re-spawn the process.
//
if (timeout > d)
{
timeout -= d;
-
- // Re-lock the mutex and revert handles to inheritable state
- // prior to re-spawning the child process.
- //
l.lock ();
il.lock ();
continue;