From d03e9d1c35b491851c7097dd7b42faa02c9ff96f Mon Sep 17 00:00:00 2001 From: Kenny Levinsen Date: Fri, 6 Aug 2021 01:09:57 +0200 Subject: seatd: We shouldn't poll if predispatch > 0 This condition was accidentally botched as part of 5923e0edc9bb157cf6398b63d51cc3c0aaf06001 --- libseat/backend/seatd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libseat/backend/seatd.c b/libseat/backend/seatd.c index 96b4681..97971aa 100644 --- a/libseat/backend/seatd.c +++ b/libseat/backend/seatd.c @@ -342,7 +342,7 @@ static int dispatch_and_execute(struct libseat *base, int timeout) { // caller might be waiting for the result. However, we'd also // like to read anything pending. int read = 0; - if (predispatch == 0 || timeout == 0) { + if (predispatch > 0 || timeout == 0) { read = connection_read(&backend->connection); } else { read = poll_connection(backend, timeout); -- cgit v1.2.3