mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:44:02 +02:00
only output no listener for type message one time
This commit is contained in:
parent
6899279d7d
commit
71557a1846
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