NetPlay: Limit ENet's MTU to 1392 as a workaround for dropped packets over VPN via WireGuard, see https://github.com/lsalzman/enet/issues/132

This commit is contained in:
Admiral H. Curtiss
2023-04-02 17:21:26 +02:00
parent 324777406c
commit 1e1041f299
4 changed files with 7 additions and 0 deletions

View File

@ -144,6 +144,8 @@ NetPlayClient::NetPlayClient(const std::string& address, const u16 port, NetPlay
return;
}
m_client->mtu = std::min(m_client->mtu, NetPlay::MAX_ENET_MTU);
ENetAddress addr;
enet_address_set_host(&addr, address.c_str());
addr.port = port;