Commit 77647195 authored by Max Kellermann's avatar Max Kellermann

event/MultiSocketMonitor: un-inline AddSocket()

parent dcbb9fe0
......@@ -42,6 +42,18 @@ MultiSocketMonitor::Reset() noexcept
ready = refresh = false;
}
bool
MultiSocketMonitor::AddSocket(SocketDescriptor fd, unsigned events) noexcept
{
fds.emplace_front(*this, fd);
bool success = fds.front().Schedule(events);
if (!success) {
fds.pop_front();
}
return success;
}
void
MultiSocketMonitor::ClearSocketList() noexcept
{
......
......@@ -145,15 +145,7 @@ public:
*
* May only be called from PrepareSockets().
*/
bool AddSocket(SocketDescriptor fd, unsigned events) noexcept {
fds.emplace_front(*this, fd);
bool success = fds.front().Schedule(events);
if (!success) {
fds.pop_front();
}
return success;
}
bool AddSocket(SocketDescriptor fd, unsigned events) noexcept;
/**
* Remove all sockets.
......
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