event/Loop: add assertions
This commit is contained in:
parent
e3270dfd68
commit
8bab5733d7
@ -118,6 +118,7 @@ EventLoop::AddFD(int fd, unsigned events, SocketEvent &event) noexcept
|
||||
#ifdef HAVE_THREADED_EVENT_LOOP
|
||||
assert(!IsAlive() || IsInside());
|
||||
#endif
|
||||
assert(events != 0);
|
||||
|
||||
if (!poll_group.Add(fd, events, &event))
|
||||
return false;
|
||||
@ -132,6 +133,7 @@ EventLoop::ModifyFD(int fd, unsigned events, SocketEvent &event) noexcept
|
||||
#ifdef HAVE_THREADED_EVENT_LOOP
|
||||
assert(!IsAlive() || IsInside());
|
||||
#endif
|
||||
assert(events != 0);
|
||||
|
||||
return poll_group.Modify(fd, events, &event);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user