mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-28 09:59:32 -06:00
Netplay: When connecting, ignore packets from traversal server
This commit is contained in:
@ -248,7 +248,12 @@ bool NetPlayClient::Connect()
|
|||||||
sf::Packet rpac;
|
sf::Packet rpac;
|
||||||
// TODO: make this not hang
|
// TODO: make this not hang
|
||||||
ENetEvent netEvent;
|
ENetEvent netEvent;
|
||||||
if (enet_host_service(m_client, &netEvent, 5000) > 0 && netEvent.type == ENET_EVENT_TYPE_RECEIVE)
|
int net;
|
||||||
|
while ((net = enet_host_service(m_client, &netEvent, 5000)) > 0 && netEvent.type == 42)
|
||||||
|
{
|
||||||
|
// ignore packets from traversal server
|
||||||
|
}
|
||||||
|
if (net > 0 && netEvent.type == ENET_EVENT_TYPE_RECEIVE)
|
||||||
{
|
{
|
||||||
rpac.append(netEvent.packet->data, netEvent.packet->dataLength);
|
rpac.append(netEvent.packet->data, netEvent.packet->dataLength);
|
||||||
enet_packet_destroy(netEvent.packet);
|
enet_packet_destroy(netEvent.packet);
|
||||||
|
Reference in New Issue
Block a user