fix: invalid assert on event fd (#243)

This commit is contained in:
Michal Hučko authored and GitHub committed 2022-02-13 18:48:50 +01:00
1 parent b7a9c63ff0
commit 5caea3b72b
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -423,7 +423,7 @@ bool Connection::processPendingRequest()
bool Connection::waitForNextRequest() bool Connection::waitForNextRequest()
{ {
assert(bus_ != nullptr); assert(bus_ != nullptr);
assert(eventFd_.fd != 0); assert(eventFd_.fd >= 0);
auto sdbusPollData = getEventLoopPollData(); auto sdbusPollData = getEventLoopPollData();
struct pollfd fds[] = { struct pollfd fds[] = {
+1 -1
View File
@@ -134,7 +134,7 @@ namespace sdbus::internal {
{ {
EventFd(); EventFd();
~EventFd(); ~EventFd();
int fd; int fd{-1};
}; };
private: private: