odbus/Watch: use SocketEvent::ReleaseSocket() to allow another Open()

This commit is contained in:
Max Kellermann 2020-12-04 11:25:07 +01:00 committed by Max Kellermann
parent 65473b5113
commit ed1caffc79

View File

@ -54,7 +54,7 @@ DbusToLibevent(unsigned flags) noexcept
void
WatchManager::Watch::Toggled() noexcept
{
event.Cancel();
event.ReleaseSocket();
if (dbus_watch_get_enabled(&watch)) {
event.Open(SocketDescriptor(dbus_watch_get_unix_fd(&watch)));