From d24a297304bc22bd45916e5ed71fabd888016967 Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Thu, 19 Nov 2020 11:53:53 -0800 Subject: [PATCH] osiSockTest: fix timeout --- modules/libcom/test/osiSockTest.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/libcom/test/osiSockTest.c b/modules/libcom/test/osiSockTest.c index e71eec5fe..7c97a472c 100644 --- a/modules/libcom/test/osiSockTest.c +++ b/modules/libcom/test/osiSockTest.c @@ -220,7 +220,7 @@ void udpSockFanoutTestRx(void* raw) #else struct timeval timeout; memset(&timeout, 0, sizeof(struct timeval)); - timeout.tv_sec = 10; + timeout.tv_sec = 5; timeout.tv_usec = 0; #endif unsigned nremain = nrepeat; @@ -234,7 +234,7 @@ void udpSockFanoutTestRx(void* raw) return; } - while(epicsTimeDiffInSeconds(&now, &start)<=5.0) { + while(!epicsTimeGetCurrent(&now) && epicsTimeDiffInSeconds(&now, &start)<=5.0) { union CASearchU buf; osiSockAddr src; osiSocklen_t srclen = sizeof(src);