commit 20d0f503988c23f34bfb8629451e7549b169d75f
Author: Alex Mayfield <alexmax2742@gmail.com>
AuthorDate: Tue Feb 21 23:24:20 2017 -0500
Commit: Alex Mayfield <alexmax2742@gmail.com>
CommitDate: Tue Feb 21 23:24:20 2017 -0500
Compare against time delta in expect loop
This way, we're not bitten by a wrapping global timer in ~49 days
---
src/i_midipipe.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/i_midipipe.c b/src/i_midipipe.c
index c0d21409..a81fc202 100644
--- a/src/i_midipipe.c
+++ b/src/i_midipipe.c
@@ -189,7 +189,7 @@ static boolean ExpectPipe(net_packet_t *packet)
return true;
// Continue looping as long as we don't exceed our maximum wait time.
- } while (start + MIDIPIPE_MAX_WAIT > I_GetTimeMS());
+ } while (I_GetTimeMS() - start <= MIDIPIPE_MAX_WAIT);
fail:
// TODO: Deal with the wedged process?