From 7bc1c9925b0ecb8ccb287a7e85354cf074162a4f Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 2 Dec 2020 15:12:29 +0100 Subject: [PATCH] event/SocketEvent: add assert() --- src/event/SocketEvent.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/event/SocketEvent.cxx b/src/event/SocketEvent.cxx index a4e507043..f117a69f1 100644 --- a/src/event/SocketEvent.cxx +++ b/src/event/SocketEvent.cxx @@ -60,6 +60,8 @@ SocketEvent::Abandon() noexcept bool SocketEvent::Schedule(unsigned flags) noexcept { + assert((flags & IMPLICIT_FLAGS) == 0); + if (flags == GetScheduledFlags()) return true;