This commit is contained in:
Michael Davidsaver
2021-10-22 10:51:32 -05:00
parent e9fb58b19e
commit 49144445f7
+6 -6
View File
@@ -75,15 +75,15 @@ struct BasicTest {
static
Value pop(const std::shared_ptr<client::Subscription>& sub, epicsEvent& evt)
{
Value ret(sub->pop());
while(!ret) {
if(!evt.wait(5.0)) {
while(true) {
if(auto ret = sub->pop()) {
return ret;
} else if (!evt.wait(5.0)) {
testFail("timeout waiting for event");
} else {
ret = sub->pop();
return Value();
}
}
return ret;
}
void orphan()