• Jon Olav Hauglid's avatar
    Bug#21770366 backport bug#21657078 to 5.5 and 5.6 · a204ce5b
    Jon Olav Hauglid authored
    Post-push fix: The problem was that condition variable
    timeouts could in some cases (slow machines and/or short
    timeouts) be infinite.
    
    When the number of milliseconds to wait is computed, the
    end time is computed before the now() time. This can result
    in the now() time being later than the end time, leading to
    negative timeout. Which after conversion to unsigned becomes
    ~infinite.
    
    This patch fixes the problem by explicitly checking if we
    get negative timeout and then using 0 if this is the case.
    a204ce5b
my_wincond.c 9.58 KB