event/SocketEvent: allow Cancel() without socket
This commit is contained in:
@@ -52,8 +52,7 @@ DbusToLibevent(unsigned flags) noexcept
|
||||
void
|
||||
WatchManager::Watch::Toggled() noexcept
|
||||
{
|
||||
if (event.IsDefined())
|
||||
event.Cancel();
|
||||
event.Cancel();
|
||||
|
||||
if (dbus_watch_get_enabled(&watch)) {
|
||||
event.Open(SocketDescriptor(dbus_watch_get_unix_fd(&watch)));
|
||||
|
Reference in New Issue
Block a user