From be269520382adbd4bea59c439599897a53109ad7 Mon Sep 17 00:00:00 2001 From: Thomas Gubler Date: Wed, 17 Dec 2014 08:03:22 +0100 Subject: [PATCH] px4 nodehandle: nuttx: call spin once also after timeout --- src/platforms/px4_nodehandle.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/platforms/px4_nodehandle.h b/src/platforms/px4_nodehandle.h index 9bd792c697..8879148a39 100644 --- a/src/platforms/px4_nodehandle.h +++ b/src/platforms/px4_nodehandle.h @@ -228,12 +228,7 @@ public: struct pollfd pfd; pfd.fd = _sub_min_interval->getHandle(); pfd.events = POLLIN; - - if (poll(&pfd, 1, timeout_ms) <= 0) { - /* timed out */ - continue; - } - + poll(&pfd, 1, timeout_ms); spinOnce(); } }