Netplay: Don't log skippable events as errors

This commit is contained in:
Floogle
2023-10-28 17:57:22 +02:00
parent 220988d064
commit bee6d5bfb6
5 changed files with 16 additions and 5 deletions

View File

@ -257,7 +257,7 @@ bool NetPlayClient::Connect()
ENetEvent netEvent;
int net;
while ((net = enet_host_service(m_client, &netEvent, 5000)) > 0 &&
netEvent.type == ENetEventType(42)) // See PR #11381 and ENetUtil::InterceptCallback
netEvent.type == Common::ENet::SKIPPABLE_EVENT)
{
// ignore packets from traversal server
}
@ -1644,7 +1644,11 @@ void NetPlayClient::ThreadFunc()
break;
default:
ERROR_LOG_FMT(NETPLAY, "enet_host_service: unknown event type: {}", int(netEvent.type));
// not a valid switch case due to not technically being part of the enum
if (netEvent.type == Common::ENet::SKIPPABLE_EVENT)
INFO_LOG_FMT(NETPLAY, "enet_host_service: skippable packet event");
else
ERROR_LOG_FMT(NETPLAY, "enet_host_service: unknown event type: {}", int(netEvent.type));
break;
}
}