Properly set PID on dummy connect events

This commit is contained in:
pixl 2020-07-14 16:20:58 -04:00
parent 89b9829b84
commit 497ec07bdf
No known key found for this signature in database
GPG Key ID: 1866C148CD593B6E

View File

@ -71,7 +71,10 @@ Device::Device(std::shared_ptr<dj::Receiver> receiver,
if(!event.linkEstablished)
throw InvalidDevice(InvalidDevice::Asleep);
_pid = event.pid;
if(!event.fromTimeoutCheck)
_pid = event.pid;
else
_pid = receiver->getPairingInfo(_index).pid;
_init();
}