seatd: We shouldn't poll if predispatch > 0

This condition was accidentally botched as part of
5923e0edc9
This commit is contained in:
Kenny Levinsen 2021-08-06 01:09:57 +02:00
parent 6444da6093
commit d03e9d1c35

View file

@ -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 // caller might be waiting for the result. However, we'd also
// like to read anything pending. // like to read anything pending.
int read = 0; int read = 0;
if (predispatch == 0 || timeout == 0) { if (predispatch > 0 || timeout == 0) {
read = connection_read(&backend->connection); read = connection_read(&backend->connection);
} else { } else {
read = poll_connection(backend, timeout); read = poll_connection(backend, timeout);