Fix deadlock issue
RawDevice would deadlock in some situations because I/O occured while the listener was turning on. This also seems to have fixed logid sometimes not detecting devices on receivers.
This commit is contained in:
@@ -325,9 +325,7 @@ void Receiver::listen()
|
||||
{
|
||||
if(!_raw_device->isListening())
|
||||
///TODO: Kill RawDevice?
|
||||
thread::spawn({[raw=this->_raw_device]() {
|
||||
raw->listen();
|
||||
}});
|
||||
_raw_device->listenAsync();
|
||||
|
||||
if(_raw_device->eventHandlers().find("RECV_HIDPP") ==
|
||||
_raw_device->eventHandlers().end()) {
|
||||
|
Reference in New Issue
Block a user