mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 18:23:54 +02:00
Merge pull request #5419 from birarda/master
only output the no listener for type message once
This commit is contained in:
commit
5f2e8f5b71
1 changed files with 7 additions and 5 deletions
|
@ -280,7 +280,7 @@ void PacketReceiver::processDatagrams() {
|
|||
|
||||
auto it = _packetListenerMap.find(packet->getType());
|
||||
|
||||
if (it != _packetListenerMap.end()) {
|
||||
if (it != _packetListenerMap.end() && it->second.isValid()) {
|
||||
|
||||
auto listener = it.value();
|
||||
|
||||
|
@ -367,10 +367,12 @@ void PacketReceiver::processDatagrams() {
|
|||
}
|
||||
|
||||
} else {
|
||||
qWarning() << "No listener found for packet type " << nameForPacketType(packet->getType());
|
||||
|
||||
// insert a dummy listener so we don't print this again
|
||||
_packetListenerMap.insert(packet->getType(), { nullptr, QMetaMethod() });
|
||||
if (it == _packetListenerMap.end()) {
|
||||
qWarning() << "No listener found for packet type " << nameForPacketType(packet->getType());
|
||||
|
||||
// insert a dummy listener so we don't print this again
|
||||
_packetListenerMap.insert(packet->getType(), { nullptr, QMetaMethod() });
|
||||
}
|
||||
}
|
||||
|
||||
_packetListenerLock.unlock();
|
||||
|
|
Loading…
Reference in a new issue