mirror of
https://github.com/PixlOne/logiops.git
synced 2025-07-14 05:12:34 +08:00
Fix device monitor deadlock
This commit is contained in:
parent
87fb4371a4
commit
d9c64892be
@ -99,9 +99,9 @@ void DeviceMonitor::ready()
|
||||
std::string devnode = udev_device_get_devnode(device);
|
||||
|
||||
if (action == "add")
|
||||
_addHandler(devnode);
|
||||
spawn_task([this, devnode]() { _addHandler(devnode); });
|
||||
else if (action == "remove")
|
||||
_removeHandler(devnode);
|
||||
spawn_task([this, devnode]() { _removeHandler(devnode); });
|
||||
|
||||
udev_device_unref(device);
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user