Commit 1c4b484a authored by Max Kellermann's avatar Max Kellermann Committed by Max Kellermann

avahi/Poll: use FineTimerEvent in AvahiTimeout

libavahi-client uses this one to schedule events immediately. However, CoarseTimerEvent may be called too late, and cause timeouts.
parent b394d8d0
......@@ -19,7 +19,7 @@
#include "Poll.hxx"
#include "event/SocketEvent.hxx"
#include "event/CoarseTimerEvent.hxx"
#include "event/FineTimerEvent.hxx"
#include "time/Convert.hxx"
static constexpr unsigned
......@@ -78,7 +78,11 @@ private:
};
struct AvahiTimeout final {
CoarseTimerEvent event;
/* note: cannot use CoarseTimerEvent because libavahi-client
sometimes schedules events immediately, and
CoarseTimerEvent may delay the timer callback for too
long, causing timeouts */
FineTimerEvent event;
const AvahiTimeoutCallback callback;
void *const userdata;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment